def __init__(self, bus, worker, master_proxy, execution_features, num_threads=1): AsynchronousExecutePlugin.__init__(self, bus, num_threads, "execute_task") self.worker = worker self.block_store = worker.block_store self.master_proxy = master_proxy self.execution_features = execution_features self.current_task_set = None self._lock = Lock()
def __init__(self, bus, block_store, master_proxy, execution_features, num_threads=1): AsynchronousExecutePlugin.__init__(self, bus, num_threads, "execute_task") self.block_store = block_store self.master_proxy = master_proxy self.execution_features = execution_features self.current_task_id = None self.current_task_execution_record = None self._lock = Lock()
def __init__(self, bus, task_pool, worker_pool): AsynchronousExecutePlugin.__init__(self, bus, 1, 'schedule') self.worker_pool = worker_pool self.task_pool = task_pool
def stop(self): for timer in self.timers.values(): timer.cancel() AsynchronousExecutePlugin.stop(self)
def __init__(self, bus, event_name="deferred_work"): AsynchronousExecutePlugin.__init__(self, bus, 1, event_name) self.timers = {} self.current_timer_id = 0