1
0
Fork 0

pass result on to command

This commit is contained in:
Sean Sube 2024-01-03 23:17:35 -06:00
parent fac98ab239
commit 7a5e6ab895
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 6 additions and 7 deletions

View File

@ -26,7 +26,7 @@ class ProgressCommand:
job: str job: str
job_type: str job_type: str
status: JobStatus status: JobStatus
results: int result: Any
steps: int steps: int
stages: int stages: int
tiles: int tiles: int
@ -37,7 +37,7 @@ class ProgressCommand:
job_type: str, job_type: str,
device: str, device: str,
status: JobStatus, status: JobStatus,
results: int = 0, result: Any = None,
steps: int = 0, steps: int = 0,
stages: int = 0, stages: int = 0,
tiles: int = 0, tiles: int = 0,
@ -46,7 +46,7 @@ class ProgressCommand:
self.job_type = job_type self.job_type = job_type
self.device = device self.device = device
self.status = status self.status = status
self.results = results self.result = result
self.steps = steps self.steps = steps
self.stages = stages self.stages = stages
self.tiles = tiles self.tiles = tiles

View File

@ -108,7 +108,6 @@ class WorkerContext:
step, step,
stages=self.callback.stage, stages=self.callback.stage,
tiles=self.callback.tile, tiles=self.callback.tile,
results=self.callback.results,
) )
self.callback = ChainProgress.from_progress(on_progress) self.callback = ChainProgress.from_progress(on_progress)
@ -123,7 +122,7 @@ class WorkerContext:
self.idle.value = idle self.idle.value = idle
def set_progress( def set_progress(
self, steps: int, stages: int = 0, tiles: int = 0, results: int = 0 self, steps: int, stages: int = 0, tiles: int = 0
) -> None: ) -> None:
if self.job is None: if self.job is None:
raise RuntimeError("no job on which to set progress") raise RuntimeError("no job on which to set progress")
@ -140,7 +139,7 @@ class WorkerContext:
steps=steps, steps=steps,
stages=stages, stages=stages,
tiles=tiles, tiles=tiles,
results=results, result=self.callback.result,
) )
self.progress.put( self.progress.put(
self.last_progress, self.last_progress,
@ -160,7 +159,7 @@ class WorkerContext:
steps=self.callback.step, steps=self.callback.step,
stages=self.callback.stage, stages=self.callback.stage,
tiles=self.callback.tile, tiles=self.callback.tile,
results=self.callback.results, result=self.callback.result,
) )
self.progress.put( self.progress.put(
self.last_progress, self.last_progress,