1
0
Fork 0

consistently pass job key to workers

This commit is contained in:
Sean Sube 2023-02-27 22:25:53 -06:00
parent 61373d530a
commit 0793b61c3a
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 3 additions and 6 deletions

View File

@ -256,7 +256,7 @@ class DevicePoolExecutor:
)
device = self.devices[device_idx].device
self.pending[device].put((fn, args, kwargs))
self.pending[device].put((key, fn, args, kwargs))
def status(self) -> List[Tuple[str, int, bool, bool]]:
history = [

View File

@ -18,11 +18,8 @@ def worker_main(context: WorkerContext, server: ServerContext):
logger.info("checking in from worker, %s", get_available_providers())
while True:
job = context.pending.get()
logger.info("got job: %s", job)
fn, args, kwargs = job
name = args[3][0]
name, fn, args, kwargs = context.pending.get()
logger.info("worker for %s got job: %s", context.device.device, name)
try:
context.job = name # TODO: hax