diff --git a/persipubsub/control.py b/persipubsub/control.py index c2914b1..88869f1 100644 --- a/persipubsub/control.py +++ b/persipubsub/control.py @@ -135,6 +135,7 @@ def init(self, :param max_readers: max number of reader of the lmdb :param max_size: max size of the lmdb in bytes :param high_watermark: high water mark limit of the queue + :param strategy: used to prune queue :return: """ if self.check_queue_is_initialized(): @@ -179,6 +180,7 @@ def _initialize_queue(self, :param max_readers: max number of reader of the lmdb :param max_size: max size of the lmdb in bytes :param high_watermark: high water mark limit of the queue + :param strategy: used to prune queue :return: """ if not self.path.exists(): diff --git a/persipubsub/environment.py b/persipubsub/environment.py index a0e65ad..96c789e 100644 --- a/persipubsub/environment.py +++ b/persipubsub/environment.py @@ -15,8 +15,12 @@ class Environment: """Fabricate persipubsub components.""" - def __init__(self, path: pathlib.Path): - """Initialize.""" + def __init__(self, path: pathlib.Path) -> None: + """ + Initialize. + + :param path: to the queue + """ self.path = path def __enter__(self) -> 'Environment': @@ -38,7 +42,13 @@ def new_control(self, """ Fabricate a new control. + :param subscriber_ids: subscribers of the queue + :param max_readers: max number of reader of the lmdb + :param max_size: max size of the lmdb in bytes + :param high_watermark: high water mark limit of the queue :return: Control to initialize queues + :param strategy: used to prune queue + :return: Control to create and maintain queue """ control = persipubsub.control.Control(path=self.path) control.init( @@ -54,6 +64,7 @@ def new_publisher( """ Fabricate a new publisher. + :param autosync: if True, store data automatically in lmdb :return: Publisher to send messages """ publisher = persipubsub.publisher.Publisher() diff --git a/persipubsub/publisher.py b/persipubsub/publisher.py index 4b82aa6..11d2155 100644 --- a/persipubsub/publisher.py +++ b/persipubsub/publisher.py @@ -13,12 +13,8 @@ class Publisher: """ Create Publisher ready to send messages. - :ivar pub_id: publisher ID - :vartype pub_id: str :ivar queue: on which messages are published :vartype queue: persipubsub.queue.Queue - :ivar sub_list: list of subscriber to which messages are send - :vartype sub_list: List[str] :ivar autosync: sync after each message or after multiple messages :vartype autosync: bool """ @@ -33,7 +29,6 @@ def init(self, path: Union[pathlib.Path, str], """ Initialize. - :param pub_id: constant ID of publisher :param path: path to the queue :param autosync: if True, store data automatically in lmdb """ diff --git a/persipubsub/queue.py b/persipubsub/queue.py index 01163fa..a55ac64 100644 --- a/persipubsub/queue.py +++ b/persipubsub/queue.py @@ -155,7 +155,7 @@ class _Queue: """ Queue messages persistently from many publishers for many subscribers. - :ivar config_pth: path to the JSON config file + :ivar path: to the queue :vartype config_pth: pathlib.Path :ivar env: LMDB environment on disk :vartype env: lmdb.Environment