From a8417aca16a5d5924bfea3789293bf52ea8ba9dc Mon Sep 17 00:00:00 2001 From: Andras Bacsai Date: Tue, 26 Mar 2024 11:17:48 +0100 Subject: [PATCH] cloud: run cleanup every day --- app/Console/Commands/CleanupDatabase.php | 2 +- app/Console/Kernel.php | 4 +--- config/sentry.php | 2 +- config/version.php | 2 +- versions.json | 2 +- 5 files changed, 5 insertions(+), 7 deletions(-) diff --git a/app/Console/Commands/CleanupDatabase.php b/app/Console/Commands/CleanupDatabase.php index 495b365ee..9e3a58a7e 100644 --- a/app/Console/Commands/CleanupDatabase.php +++ b/app/Console/Commands/CleanupDatabase.php @@ -20,7 +20,7 @@ class CleanupDatabase extends Command $keep_days = 60; echo "Keep days: $keep_days\n"; // Cleanup failed jobs table - $failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(7)); + $failed_jobs = DB::table('failed_jobs')->where('failed_at', '<', now()->subDays(1)); $count = $failed_jobs->count(); echo "Delete $count entries from failed_jobs.\n"; if ($this->option('yes')) { diff --git a/app/Console/Kernel.php b/app/Console/Kernel.php index d43da9cbe..ac17f6640 100644 --- a/app/Console/Kernel.php +++ b/app/Console/Kernel.php @@ -48,9 +48,7 @@ class Kernel extends ConsoleKernel $this->pull_helper_image($schedule); $this->check_scheduled_tasks($schedule); - if (!isCloud()) { - $schedule->command('cleanup:database --yes')->daily(); - } + $schedule->command('cleanup:database --yes')->daily(); } } private function pull_helper_image($schedule) diff --git a/config/sentry.php b/config/sentry.php index b432cb213..ec6abd3c9 100644 --- a/config/sentry.php +++ b/config/sentry.php @@ -7,7 +7,7 @@ return [ // The release version of your application // Example with dynamic git hash: trim(exec('git --git-dir ' . base_path('.git') . ' log --pretty="%h" -n1 HEAD')) - 'release' => '4.0.0-beta.244', + 'release' => '4.0.0-beta.245', // When left empty or `null` the Laravel environment will be used 'environment' => config('app.env'), diff --git a/config/version.php b/config/version.php index 40004d17e..8b2443f54 100644 --- a/config/version.php +++ b/config/version.php @@ -1,3 +1,3 @@