Skip to content

Commit

Permalink
added delay to every loop iteration (#60)
Browse files Browse the repository at this point in the history
Co-authored-by: Daniel Dakhno <[email protected]>
Co-authored-by: Shaodong <[email protected]>
  • Loading branch information
3 people authored Sep 23, 2024
1 parent 71aa851 commit 3da97ca
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions modpoll/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
import signal
import sys
import threading
import time
from datetime import timezone

from modpoll.arg_parser import get_parser
Expand Down Expand Up @@ -183,6 +184,9 @@ def app(name="modpoll"):
if args.once:
event_exit.set()
break

time.sleep(1)

modbus_close()
mqttc_close()

Expand Down

0 comments on commit 3da97ca

Please sign in to comment.