Skip to content

Commit

Permalink
Update logging
Browse files Browse the repository at this point in the history
  • Loading branch information
jlubken committed Jun 2, 2020
1 parent fbebef3 commit d4d8bfc
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/dsdk/service.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,16 +118,16 @@ def __init__(
# ... because self.pipeline is not optional
assert self.pipeline is not None

TASK_BEGIN = "".join(
("{", ", ".join(('"key": "task.begin"', '"task": "%s"')), "}")
TASK_ON = "".join(
("{", ", ".join(('"key": "task.on"', '"task": "%s"')), "}")
)

TASK_END = "".join(
("{", ", ".join(('"key": "task.end"', '"task": "%s"')), "}")
)

PIPELINE_BEGIN = "".join(
("{", ", ".join(('"key": "pipeline.end"', '"pipeline": "%s"')), "}")
PIPELINE_ON = "".join(
("{", ", ".join(('"key": "pipeline.on"', '"pipeline": "%s"')), "}")
)

PIPELINE_END = "".join(
Expand All @@ -137,9 +137,9 @@ def __init__(
def __call__(self) -> Batch:
"""Run."""
with self.open_batch() as batch:
logger.info(self.PIPELINE_BEGIN, self.__class__.__name__)
logger.info(self.PIPELINE_ON, self.__class__.__name__)
for task in self.pipeline:
logger.info(self.TASK_BEGIN, task.__class__.__name__)
logger.info(self.TASK_ON, task.__class__.__name__)
task(batch, self)
logger.info(self.TASK_END, task.__class__.__name__)
logger.info(self.PIPELINE_END, self.__class__.__name__)
Expand Down

0 comments on commit d4d8bfc

Please sign in to comment.