remove comments and remove duplicated scheduling
This commit is contained in:
parent
b64d4881cb
commit
50ede5cab9
2 changed files with 2 additions and 7 deletions
|
|
@ -45,10 +45,6 @@ protected function schedule(Schedule $schedule): void
|
|||
$schedule->command('cleanup:unreachable-servers')->daily();
|
||||
$schedule->job(new PullTemplatesFromCDN)->daily()->onOneServer();
|
||||
$schedule->job(new CleanupInstanceStuffsJob)->everyFiveMinutes()->onOneServer();
|
||||
$schedule->job(new PullCoolifyImageJob)->cron($settings->update_check_frequency ?? '0 0 * * *')->onOneServer();
|
||||
$schedule->job(new CheckForUpdatesJob())->cron($settings->auto_update_frequency ?? '0 11,23 * * *')->onOneServer();
|
||||
|
||||
// Server Jobs
|
||||
$this->scheduleUpdates($schedule);
|
||||
$this->pull_images($schedule);
|
||||
$this->check_resources($schedule);
|
||||
|
|
@ -76,11 +72,11 @@ private function scheduleUpdates($schedule)
|
|||
{
|
||||
$settings = InstanceSettings::get();
|
||||
|
||||
$updateCheckFrequency = $settings->update_check_frequency ?? '0 0 * * *'; // Default to daily at 00:00
|
||||
$updateCheckFrequency = $settings->update_check_frequency ?? '0 0 * * *';
|
||||
$schedule->job(new CheckForUpdatesJob())->cron($updateCheckFrequency)->onOneServer();
|
||||
|
||||
if ($settings->is_auto_update_enabled) {
|
||||
$autoUpdateFrequency = $settings->auto_update_frequency ?? '0 11,23 * * *'; // Default to twice daily at 11:00 and 23:00
|
||||
$autoUpdateFrequency = $settings->auto_update_frequency ?? '0 11,23 * * *';
|
||||
$schedule->job(new UpdateCoolifyJob())->cron($autoUpdateFrequency)->onOneServer();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,7 +91,6 @@ public function submit()
|
|||
}
|
||||
$this->validate();
|
||||
|
||||
// Allow empty values and set defaults
|
||||
if ($this->is_auto_update_enabled && !$this->validateCronExpression($this->auto_update_frequency)) {
|
||||
$this->dispatch('error', 'Invalid Cron / Human expression for Auto Update Frequency.');
|
||||
return;
|
||||
|
|
|
|||
Loading…
Reference in a new issue