consistently pass job key to workers
This commit is contained in:
parent
61373d530a
commit
0793b61c3a
|
@ -256,7 +256,7 @@ class DevicePoolExecutor:
|
||||||
)
|
)
|
||||||
|
|
||||||
device = self.devices[device_idx].device
|
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]]:
|
def status(self) -> List[Tuple[str, int, bool, bool]]:
|
||||||
history = [
|
history = [
|
||||||
|
|
|
@ -18,11 +18,8 @@ def worker_main(context: WorkerContext, server: ServerContext):
|
||||||
logger.info("checking in from worker, %s", get_available_providers())
|
logger.info("checking in from worker, %s", get_available_providers())
|
||||||
|
|
||||||
while True:
|
while True:
|
||||||
job = context.pending.get()
|
name, fn, args, kwargs = context.pending.get()
|
||||||
logger.info("got job: %s", job)
|
logger.info("worker for %s got job: %s", context.device.device, name)
|
||||||
|
|
||||||
fn, args, kwargs = job
|
|
||||||
name = args[3][0]
|
|
||||||
|
|
||||||
try:
|
try:
|
||||||
context.job = name # TODO: hax
|
context.job = name # TODO: hax
|
||||||
|
|
Loading…
Reference in New Issue