mentat.daemon.component.filer module

Daemon component responsible for management of incoming and outgoing message queues. Is is implemented as an encapsulation of mentat.dirq.DirectoryQueue.

The implementation is based on pyzenkit.zendaemon.ZenDaemonComponent.

class mentat.daemon.component.filer.FilerDaemonComponent(**kwargs)[source]

Bases: ZenDaemonComponent

Implementation of ZenDaemonComponent encapsulating mentat.dirq.DirectoryQueue.

CONFIG_QUEUE_IN_WAIT = 'queue_in_wait'
CONFIG_QUEUE_OUT_LIMIT = 'queue_out_limit'
CONFIG_QUEUE_OUT_WAIT = 'queue_out_wait'
EVENT_LOG_STATISTICS = 'log_statistics'
EVENT_MSG_BANISH = 'message_banish'
EVENT_MSG_CANCEL = 'message_cancel'
EVENT_MSG_COMMIT = 'message_commit'
EVENT_MSG_DISPATCH = 'message_dispatch'
EVENT_MSG_DUPLICATE = 'message_duplicate'
EVENT_MSG_ENQUEUE = 'message_enqueue'
EVENT_MSG_NEXT = 'message_next'
EVENT_MSG_PROCESS = 'message_process'
EVENT_MSG_UPDATE = 'message_update'
EVENT_QUEUE_CHECK = 'queue_check'
EVENT_START = 'start'
STATS_CNT_BANISHED = 'cnt_banished'
STATS_CNT_CANCELED = 'cnt_canceled'
STATS_CNT_COMMITTED = 'cnt_committed'
STATS_CNT_DISPATCHED = 'cnt_dispatched'
STATS_CNT_DUPLICATED = 'cnt_duplicated'
STATS_CNT_ENQUEUED = 'cnt_enqueued'
STATS_CNT_ERRORS = 'cnt_errors'
STATS_CNT_FETCHED = 'cnt_fetched'
STATS_CNT_UPDATED = 'cnt_updated'
STATUS_PAUSED = 'status_paused'
STATUS_RUNNING = 'status_running'
cbk_event_log_statistics(daemon, args)[source]

Periodical processing statistics logging.

cbk_event_message_banish(daemon, args)[source]

Banish message from queue.

cbk_event_message_cancel(daemon, args)[source]

Cancel message from queue.

cbk_event_message_commit(daemon, args)[source]

Commit message from queue.

cbk_event_message_dispatch(daemon, args)[source]

Dispatch message from queue to another queue.

cbk_event_message_duplicate(daemon, args)[source]

Duplicate message from queue to another queue.

cbk_event_message_enqueue(daemon, args)[source]

Enqueue given message to the queue and schedule the processing event.

cbk_event_message_next(daemon, args=None)[source]

Fetch next message from the queue and schedule the processing event.

cbk_event_message_update(daemon, args)[source]

Update the message within pending queue.

cbk_event_queue_check(daemon, args)[source]

Check the size of output message queue and pause processing, when necessary.

cbk_event_start(daemon, args)[source]

Start the component.

get_events()[source]

Get the mapping of event names and their appropriate callback handlers.

setup(daemon)[source]

Perform component setup.