Skip to content

Commit

Permalink
Fix issue with negative seconds to sleep in time input plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
rnv812 committed Jun 13, 2024
1 parent 253673a commit edd9a5f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion eventum_plugins/input/timer.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ def live(self, on_event: Callable[[datetime64], Any]) -> None:
timestamp - get_now(tz=self._tz)
)

time.sleep(sleep_seconds) # type: ignore[arg-type]
if sleep_seconds > 0:
time.sleep(sleep_seconds) # type: ignore[arg-type]

for _ in range(self._count):
on_event(timestamp)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "eventum-plugins"
version = "1.0.7"
version = "1.0.8"
description = "Plugins for Eventum"
license = "Apache-2.0"
authors = ["Nikita Reznikov <[email protected]>"]
Expand Down

0 comments on commit edd9a5f

Please sign in to comment.