Skip to content

Commit

Permalink
bound task_id
Browse files Browse the repository at this point in the history
  • Loading branch information
qqaatw committed Mar 2, 2024
1 parent 9a0cd85 commit 19b0868
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion JciHitachi/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -938,10 +938,13 @@ def task_id(self) -> int:
Returns
-------
int
Serial number counted from 0.
Serial number counted from 0, with maximum 999.
"""

self._task_id += 1
if self._task_id >= 1000:
self._task_id = 1

return self._task_id

def _check_before_publish(self) -> None:
Expand Down

0 comments on commit 19b0868

Please sign in to comment.