pass result on to command
This commit is contained in:
parent
fac98ab239
commit
7a5e6ab895
|
@ -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
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in New Issue