Skip to content

Commit

Permalink
Merge pull request #70 from Utesgui/fix_run_once
Browse files Browse the repository at this point in the history
fix not_done_once variable in monitor.py
  • Loading branch information
ZuinigeRijder authored Oct 16, 2024
2 parents 0db3105 + c249b2c commit 66d40ca
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,10 +582,10 @@ def monitor():
"""monitor"""
global MONITOR_SOMETHING_WRITTEN_OR_ERROR # pylint:disable=global-statement
prev_time = datetime.now() - timedelta(days=1.0) # once per day login
not_done_once = False
not_done_once = True
error_count = 1
while not_done_once or MONITOR_INFINITE:
not_done_once = True
not_done_once = False
current_time = datetime.now()
# login when 4x15 minutes subsequent errors or once at beginning of new day
login = (error_count % 4 == 0) or not same_day(prev_time, current_time)
Expand Down

0 comments on commit 66d40ca

Please sign in to comment.