|
@@ -36,10 +36,7 @@ class _StandaloneJobDispatcher(_JobDispatcher):
|
|
|
def run(self):
|
|
|
with self._executor:
|
|
|
super().run()
|
|
|
- # TODO REMOVE THIS
|
|
|
- self._logger.info("Thread is stopped")
|
|
|
- # TODO REMOVE THIS
|
|
|
- self._logger.info("Executor is closed")
|
|
|
+ self._logger.info("Standalone job dispatcher: Pool executor shut down")
|
|
|
|
|
|
def _dispatch(self, job: Job):
|
|
|
"""Dispatches the given `Job^` on an available worker for execution.
|
|
@@ -50,9 +47,6 @@ class _StandaloneJobDispatcher(_JobDispatcher):
|
|
|
|
|
|
self._nb_available_workers -= 1
|
|
|
config_as_string = _TomlSerializer()._serialize(Config._applied_config) # type: ignore[attr-defined]
|
|
|
- # TODO REMOVE THIS
|
|
|
- if self._executor._shutdown_thread: # type: ignore
|
|
|
- self._logger.info(f"{job.id=}, {job.task.id=} is not dispatched because executor is closed.")
|
|
|
future = self._executor.submit(_TaskFunctionWrapper(job.id, job.task), config_as_string=config_as_string)
|
|
|
|
|
|
self._set_dispatched_processes(job.id, future) # type: ignore
|