Module markov.common.markov_queue.persist_ack_queue_wrapper

Classes

class PersistAckQueueWrapper (persist_path)

A thread based implementation of persist queues with ack/nack capability

Note: Size of queue -> #put - #get + #nack Note: Not fit for multiple consumers as get_batch and get_all are not thread-safe

Attributes

queue
The underlying queue that supports get/put operations

Set up the queue-wrapper with underlying queue

Args

persist_path
The path at which the underlying queue will be persisted

Ancestors

Methods

def ack(self, item) ‑> None

Marks the item as processed - get will not retrieve this item

Args

item
element gotten from queue that has been processed
def nack(self, item) ‑> None

Marks the item as unprocessed - get will retrieve this item in the next call

Args

item
element gotten from queue that is not correctly processed

Inherited members