1
0
Fork 0

feat(api): save output of each stage in debug mode

This commit is contained in:
Sean Sube 2023-01-28 23:08:56 -06:00
parent 8f1cbc83f8
commit 680adc70ea
1 changed files with 3 additions and 0 deletions

View File

@ -96,6 +96,9 @@ class ChainPipeline:
logger.info('finished stage %s, result size: %sx%s', logger.info('finished stage %s, result size: %sx%s',
name, image.width, image.height) name, image.width, image.height)
if is_debug():
image.save(path.join(ctx.output_path, 'last-stage.png'))
end = monotonic() end = monotonic()
duration = timedelta(seconds=(end - start)) duration = timedelta(seconds=(end - start))
logger.info('finished pipeline in %s, result size: %sx%s', logger.info('finished pipeline in %s, result size: %sx%s',