Отчёты, показатели работы и присмотр за порогами
This commit is contained in:
1 parent
c4e9f6fc37
commit
f66391261d
17 files changed
+1124
-6
No files matched your search
@@ -8,6 +8,7 @@ use Rsgrinko\Proton\Backup\BackupJob;
|
||||
use Rsgrinko\Proton\Models\Setting;
|
||||
use Rsgrinko\Proton\Support\Config;
|
||||
use Rsgrinko\Proton\Support\Logger;
|
||||
use Rsgrinko\Proton\Support\Monitor;
|
||||
use Throwable;
|
||||
|
||||
/**
|
||||
@@ -174,5 +175,16 @@ final class Scheduler
|
||||
Queue::push(BackupJob::class);
|
||||
});
|
||||
}
|
||||
|
||||
// Присмотр за порогами: о беде лучше узнать от приложения, чем от людей
|
||||
if ((bool) Config::get('monitor.enabled', true)) {
|
||||
self::every(
|
||||
max(60, (int) Config::get('monitor.interval', 300)),
|
||||
'monitor:check',
|
||||
static function (): void {
|
||||
Monitor::check();
|
||||
}
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user