Implement heartbeat log

This commit is contained in:
deajan 2024-09-15 19:50:53 +02:00
parent 6149404a1f
commit 3beb42250a
3 changed files with 7 additions and 2 deletions

View file

@ -23,6 +23,10 @@ CHECK_INTERVAL = 0.005
GUI_CHECK_INTERVAL = 0.005
# Interval on which we log a status message stating we're still alive
# This is useful for long running operations
HEARTBEAT_INTERVAL = 3600
# Arbitrary timeout for init / init checks.
# If init takes more than a minute, we really have a problem in our backend
FAST_COMMANDS_TIMEOUT = 60

View file

@ -1,4 +1,4 @@
command_runner>=1.6.0
command_runner>=1.7.0
cryptidy>=1.2.2
python-dateutil
ofunctions.logger_utils>=2.4.1

View file

@ -23,7 +23,7 @@ from functools import wraps
from command_runner import command_runner
from ofunctions.misc import BytesConverter, fn_name
from npbackup.__debug__ import _DEBUG
from npbackup.__env__ import FAST_COMMANDS_TIMEOUT, CHECK_INTERVAL
from npbackup.__env__ import FAST_COMMANDS_TIMEOUT, CHECK_INTERVAL, HEARTBEAT_INTERVAL
from npbackup.path_helper import CURRENT_DIR
from npbackup.restic_wrapper import schema
@ -344,6 +344,7 @@ class ResticRunner:
priority=self._priority,
io_priority=self._priority,
windows_no_window=True,
heartbeat=HEARTBEAT_INTERVAL,
)
# Don't keep protected environment variables in memory when not necessary
self._remove_env()