def __init__(self, job_scheduler, event_writer): """ @configs: a list like object containing a list of dict like object. Each element shall implement dict.get/[] like interfaces to get the value for a key. @job_scheduler: schedulering the jobs. shall implement get_ready_jobs @event_writer: write_events """ self._settings = self._read_default_settings() self._settings["daemonize_thread"] = False self._event_writer = event_writer self._wakeup_queue = queue.Queue() self._scheduler = job_scheduler self._timer_queue = tq.TimerQueue() self._executor = ce.ConcurrentExecutor(self._settings) self._started = False
def __init__(self, config, job_scheduler, event_writer): """ @config: dict like object like object. Each element shall implement dict.get/[] like interfaces to get the value for a key. @job_scheduler: schedulering the jobs. shall implement get_ready_jobs @event_writer: write_events """ self._settings = self._read_default_settings() self._config = config self._event_writer = event_writer self._scheduler = job_scheduler self._timer_queue = tq.TimerQueue() self._executor = ce.ConcurrentExecutor(self._settings) self._orphan_checker = opm.OrphanProcessChecker(None) self._started = False