Replace cron/worker "last" config entries with key-value entries

This commit is contained in:
Philipp 2022-12-29 20:30:19 +01:00
parent 10f8631cd9
commit 6b3265742a
No known key found for this signature in database
GPG key ID: 24A7501396EB5432
6 changed files with 25 additions and 17 deletions

View file

@ -93,11 +93,11 @@ class Daemon
}
// Check every minute if the daemon is running
if (DI::config()->get('system', 'last_daemon_check', 0) + 60 > time()) {
if ((DI::keyValue()->get('last_daemon_check') ?? 0) + 60 > time()) {
return;
}
DI::config()->set('system', 'last_daemon_check', time());
DI::keyValue()->set('last_daemon_check', time());
$pidfile = DI::config()->get('system', 'pidfile');
if (empty($pidfile)) {