pyoaev.daemons.collector_daemon
Module Contents
- pyoaev.daemons.collector_daemon.DEFAULT_PERIOD_SECONDS = 60
- class pyoaev.daemons.collector_daemon.CollectorDaemon(configuration: pyoaev.Configuration, callback: callable = None, logger=None, api_client=None, collector_type=None)
Bases:
pyoaev.daemons.BaseDaemonImplementation of a daemon of Collector type. Note that it requires specific configuration keys to run its setup. collector_icon_filepath: relative path to an icon image (preferably PNG) collector_id: unique identifier for the collector (UUIDv4) collector_period: time to wait in seconds between each loop execution; note that this time is added to the time the loop takes to run, so the actual total time between each loop start is time_of_loop+period.
- collector_type = None
- _setup()
A run-once method that inheritors must implement. This serves to instantiate all useful objects and functionality for the implementor to run.
- _start_loop()
Starts the daemon’s main execution loop. Implementors should implement the main execution logic in here.
- __schedule(scheduler, callback, delay)