Skip to content

Commit

Permalink
Fake punch worker accepts no interval setting
Browse files Browse the repository at this point in the history
  • Loading branch information
lukipuki committed Jun 10, 2024
1 parent 8e79df1 commit e59c966
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions python/yaroc/sources/si.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,10 @@ def __str__(self):
class FakeSiWorker(SiWorker):
"""Creates fake SportIdent events, useful for benchmarks and tests."""

def __init__(self, punch_interval_secs: float = 12):
def __init__(self, punch_interval_secs: float | None = None):
super().__init__()
self.name = "fake"
self._punch_interval = punch_interval_secs
self._punch_interval = punch_interval_secs if punch_interval_secs is not None else 12.0
logging.info(
"Starting a fake SportIdent worker, sending a punch every "
f"{self._punch_interval} seconds"
Expand Down

0 comments on commit e59c966

Please sign in to comment.