Esempio n. 1
0
    def __init__(self, engine, conf):
        JobManager.__init__(self, "mcore", engine, conf)

        self._num_cores = self.conf.get("max_cores", mp.cpu_count(), dtype=int)

        self._running = False
        self._kill_threads = False
        self._threads = []

        self._run_lock = Lock()
        self._run_cvar = Condition(self._run_lock)

        self._jobs = {}

        self._waiting_queue = PriorityQueue()

        self._task_output_files = {}
Esempio n. 2
0
    def __init__(self, engine, conf):
        JobManager.__init__(self, "dummy", engine, conf)

        self._num_cores = self.conf.get("max_cores", mp.cpu_count(), dtype=int)

        self._delay = self.conf.get("delay", 1, dtype=int)
        self._min_delay = self.conf.get("min_delay", self._delay, dtype=int)
        self._max_delay = self.conf.get("max_delay", self._delay, dtype=int)
        self._max_delay = max(self._min_delay, self._max_delay)
        self._tick = self.conf.get("tick", 0.2, dtype=float)
        self._error_ratio = self.conf.get("error_ratio", 0, dtype=float)

        self._running = False
        self._threads = []

        self._run_lock = Lock()
        self._run_cvar = Condition(self._run_lock)

        self._jobs = {}

        self._waiting_queue = PriorityQueue()