Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix not_done_once variable in monitor.py #70

Merged
merged 1 commit into from
Oct 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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