fix edge case for thin client
parent
0c0a56bcea
commit
f25249c646
|
|
@ -276,9 +276,15 @@ class Script(scripts.Script):
|
|||
}
|
||||
|
||||
# start generating images assigned to remote machines
|
||||
sync = False # should only really to sync once per job
|
||||
sync = False # should only really need to sync once per job
|
||||
Script.world.optimize_jobs(payload) # optimize work assignment before dispatching
|
||||
started_jobs = []
|
||||
|
||||
# check if anything even needs to be done
|
||||
if len(Script.world.jobs) == 1 and Script.world.jobs[0].worker.master:
|
||||
logger.debug(f"distributed doesn't have to do anything, returning control to webui")
|
||||
return
|
||||
|
||||
for job in Script.world.jobs:
|
||||
payload_temp = copy.deepcopy(payload)
|
||||
|
||||
|
|
|
|||
|
|
@ -375,7 +375,7 @@ class World:
|
|||
filtered = []
|
||||
for worker in self.__workers:
|
||||
if worker.avg_ipm is not None and worker.avg_ipm <= 0:
|
||||
logger.warn(f"config reports invalid speed (0 ipm) for worker '{worker.uuid}', setting default of 1 ipm.\nplease re-benchmark")
|
||||
logger.warning(f"config reports invalid speed (0 ipm) for worker '{worker.uuid}', setting default of 1 ipm.\nplease re-benchmark")
|
||||
worker.avg_ipm = 1
|
||||
continue
|
||||
if worker.master and self.thin_client_mode:
|
||||
|
|
@ -477,3 +477,10 @@ class World:
|
|||
for job in self.jobs:
|
||||
distro_summary += f"'{job.worker.uuid}' - {job.batch_size * iterations} images\n"
|
||||
logger.info(distro_summary)
|
||||
|
||||
# delete any jobs that have no work
|
||||
last = len(self.jobs) - 1
|
||||
while last > 0:
|
||||
if self.jobs[last].batch_size < 1:
|
||||
del self.jobs[last]
|
||||
last -= 1
|
||||
|
|
|
|||
Loading…
Reference in New Issue