Skip to content

Commit

Permalink
Fix execution counter
Browse files Browse the repository at this point in the history
  • Loading branch information
nx10 committed May 22, 2024
1 parent 19f08e9 commit 3b3307e
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/styxdefs/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,17 +71,17 @@ def __init__(self, data_dir: InputPathType | None = None) -> None:
self.logger.setLevel(logging.DEBUG)
ch = logging.StreamHandler()
ch.setLevel(logging.DEBUG)
formatter = logging.Formatter(
"[%(levelname)s.1s] %(message)s"
)
formatter = logging.Formatter("[%(levelname)s.1s] %(message)s")
ch.setFormatter(formatter)
self.logger.addHandler(ch)

def start_execution(self, metadata: Metadata) -> Execution:
"""Start a new execution."""
self.execution_counter += 1
return _DefaultExecution(
logger=self.logger,
dir=self.data_dir / f"{self.uid}_{self.execution_counter}_{metadata.name}",
dir=self.data_dir
/ f"{self.uid}_{self.execution_counter - 1}_{metadata.name}",
)


Expand Down

0 comments on commit 3b3307e

Please sign in to comment.