Compare commits

...

1 Commits

Author SHA1 Message Date
Dan Helfman 66bbb010e5 Add instrumentation for whether checks are being run. 2023-02-28 09:40:01 -08:00
1 changed files with 8 additions and 0 deletions

View File

@ -132,6 +132,9 @@ def filter_checks_on_frequency(
make_check_time_path(location_config, borg_repository_id, check)
)
if not check_time:
logger.debug(
f"Running {check} check due to never having run before"
)
continue
# If we've not yet reached the time when the frequency dictates we're ready for another
@ -142,6 +145,11 @@ def filter_checks_on_frequency(
f"Skipping {check} check due to configured frequency; {remaining} until next check"
)
filtered_checks.remove(check)
else:
due_at = check_time + frequency_delta
logger.debug(
f"Running {check} check due to configured frequency; the last check was at {check_time} with a frequency of {check_config.get('frequency')}, so the check was due at {due_at} ({datetime.datetime.now() - due_at} ago)"
)
return tuple(filtered_checks)