X-Git-Url: https://wannabe.guru.org/gitweb/?a=blobdiff_plain;ds=inline;f=executors.py;h=3cb0a916c080128e63a23600db76c07e93956ec9;hb=592f27f4743c0a66b6634692fea6c3eb8f252814;hp=0b4d80ed1b8b0b387b4b6a7363c13c268e265a5c;hpb=351e77c767c9084aa486eedbdc9902c635b06261;p=python_utils.git diff --git a/executors.py b/executors.py index 0b4d80e..3cb0a91 100644 --- a/executors.py +++ b/executors.py @@ -476,6 +476,7 @@ class RemoteExecutor(BaseExecutor): policy: RemoteWorkerSelectionPolicy) -> None: super().__init__() self.workers = workers + self.policy = policy self.worker_count = 0 for worker in self.workers: self.worker_count += worker.count @@ -483,7 +484,6 @@ class RemoteExecutor(BaseExecutor): msg = f"We need somewhere to schedule work; count was {self.worker_count}" logger.critical(msg) raise Exception(msg) - self.policy = policy self.policy.register_worker_pool(self.workers) self.cv = threading.Condition() self._helper_executor = fut.ThreadPoolExecutor( @@ -493,7 +493,7 @@ class RemoteExecutor(BaseExecutor): self.status = RemoteExecutorStatus(self.worker_count) self.total_bundles_submitted = 0 logger.debug( - f'Creating remote processpool with {self.worker_count} remote endpoints.' + f'Creating remote processpool with {self.worker_count} remote worker threads.' ) def is_worker_available(self) -> bool: