1
0
Fork 0

lint(api): make chain pipeline logs more consistent

This commit is contained in:
Sean Sube 2023-07-04 12:17:55 -05:00
parent d1ecef9f2e
commit f718087a54
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 10 additions and 6 deletions

View File

@ -59,9 +59,10 @@ class ChainPipeline:
def append(self, stage: Optional[PipelineStage]): def append(self, stage: Optional[PipelineStage]):
""" """
DEPRECATED: use `stage` instead
Append an additional stage to this pipeline. Append an additional stage to this pipeline.
This requires an already-assembled `PipelineStage`. Use `ChainPipeline.stage` if you want the pipeline to
assemble the stage from loose arguments.
""" """
if stage is not None: if stage is not None:
self.stages.append(stage) self.stages.append(stage)
@ -118,7 +119,7 @@ class ChainPipeline:
if image is not None: if image is not None:
logger.debug( logger.debug(
"running stage %s on source image with dimensions %sx%s, %s", "running stage %s with source size of %sx%s, parameters: %s",
name, name,
image.width, image.width,
image.height, image.height,
@ -169,7 +170,7 @@ class ChainPipeline:
**kwargs, **kwargs,
) )
else: else:
logger.debug("image within tile size, running stage") logger.debug("image within tile size of %s, running stage", tile)
image = stage_pipe.run( image = stage_pipe.run(
job, job,
server, server,
@ -181,7 +182,10 @@ class ChainPipeline:
) )
logger.debug( logger.debug(
"finished stage %s, result size: %sx%s", name, image.width, image.height "finished stage %s with result size of %sx%s",
name,
image.width,
image.height,
) )
if is_debug(): if is_debug():
@ -190,7 +194,7 @@ class ChainPipeline:
end = monotonic() end = monotonic()
duration = timedelta(seconds=(end - start)) duration = timedelta(seconds=(end - start))
logger.info( logger.info(
"finished pipeline in %s, result size: %sx%s", "finished pipeline in %s with result size of %sx%s",
duration, duration,
image.width, image.width,
image.height, image.height,