forked from borgmatic-collective/borgmatic
Add instrumentation for whether checks are being run.
This commit is contained in:
parent
dbf8301c19
commit
66bbb010e5
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in New Issue