mentat.daemon.component.storage module

Daemon component capable of storing IDEA messages into persistent storage. Currently only PostgreSQL database is supported.

It is dependent on services of following modules:

The implementation is based on pyzenkit.zendaemon.ZenDaemonComponent.

class mentat.daemon.component.storage.StorageDaemonComponent(**kwargs)[source]

Bases: pyzenkit.zendaemon.ZenDaemonComponent

Daemon component capable of storing IDEA messages into database.

EVENT_LOG_STATISTICS = 'log_statistics'
EVENT_MSG_PROCESS = 'message_process'
STATS_CNT_ERRORS = 'cnt_errors'
STATS_CNT_STORED = 'cnt_stored'
cbk_event_log_statistics(daemon, args)[source]

Periodical processing statistics logging.

cbk_event_message_process(daemon, args)[source]

Store the message into the persistent storage.

get_events()[source]

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

setup(daemon)[source]

Perform component setup.