An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.
PHP coolifydatabasesdeploymentdockerdocker-composeinertiajslaravelmariadbmysqlnextjsnodejsphppostgresredisself-hostedself-hostingserverstatic-sitesveltesvelte5
fix(scheduler): run stuck resource cleanup in background at 03:17
Andras Bacsai1d0d6b4a79f3
diff --git a/app/Console/Kernel.php b/app/Console/Kernel.phpindex 8d4d017c81..8eb010b8ac 100644--- a/app/Console/Kernel.php+++ b/app/Console/Kernel.php@@ -47,9 +47,10 @@ class Kernel extends ConsoleKernel->when(fn () => config('constants.ssh.mux_enabled') && ! config('constants.coolify.is_windows_docker_desktop'));$this->scheduleInstance->command('cleanup:redis --clear-locks')->daily();$this->scheduleInstance->command('cleanup:stucked-resources')- ->daily()+ ->dailyAt('03:17')->onOneServer()- ->withoutOverlapping(60);+ ->withoutOverlapping(60)+ ->runInBackground();$this->scheduleInstance->command('sanctum:prune-expired --hours=1')->hourly()->onOneServer();$this->scheduleInstance->job(new ApiTokenExpirationWarningJob)->hourly()->onOneServer();diff --git a/config/constants.php b/config/constants.phpindex 457a8a1ff8..d2e2a9f33d 100644--- a/config/constants.php+++ b/config/constants.php@@ -2,7 +2,7 @@return ['coolify' => [- 'version' => env('COOLIFY_VERSION') ?: '4.3.15',+ 'version' => env('COOLIFY_VERSION') ?: '4.3.16','helper_version' => '1.0.16','realtime_version' => '1.0.18','railpack_version' => '0.23.0',diff --git a/other/nightly/versions.json b/other/nightly/versions.jsonindex 455918fdc0..a3a660f9cb 100644--- a/other/nightly/versions.json+++ b/other/nightly/versions.json@@ -1,7 +1,7 @@{"coolify": {"v4": {- "version": "4.3.15"+ "version": "4.3.16"},"nightly": {"version": "4.4-rc.1"diff --git a/tests/Feature/ScheduleOnOneServerTest.php b/tests/Feature/ScheduleOnOneServerTest.phpindex ef2d80e648..3ad3808631 100644--- a/tests/Feature/ScheduleOnOneServerTest.php+++ b/tests/Feature/ScheduleOnOneServerTest.php@@ -59,7 +59,7 @@ it('does not schedule Stripe subscription reconciliation automatically', functioexpect($event)->toBeNull();});-it('schedules stuck resource cleanup once per day on one server', function () {+it('schedules stuck resource cleanup in the background once per day', function () {$schedule = app(Schedule::class);$event = collect($schedule->events())->first(@@ -67,6 +67,8 @@ it('schedules stuck resource cleanup once per day on one server', function () {);expect($event)->not->toBeNull()- ->and($event->expression)->toBe('0 0 * * *')- ->and($event->onOneServer)->toBeTrue();+ ->and($event->expression)->toBe('17 3 * * *')+ ->and($event->onOneServer)->toBeTrue()+ ->and($event->withoutOverlapping)->toBeTrue()+ ->and($event->runInBackground)->toBeTrue();});diff --git a/tests/Unit/ProductionImageWorkflowTest.php b/tests/Unit/ProductionImageWorkflowTest.phpindex 293c9422e9..4e6229d073 100644--- a/tests/Unit/ProductionImageWorkflowTest.php+++ b/tests/Unit/ProductionImageWorkflowTest.php@@ -23,8 +23,8 @@ it('publishes v4 branch builds under the commit sha with a traceable internal ve->toContain('ARG COOLIFY_VERSION')->toContain('ENV COOLIFY_VERSION=${COOLIFY_VERSION}')->and($constants)- ->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.15'")- ->and($versions['coolify']['v4']['version'])->toBe('4.3.15')+ ->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.16'")+ ->and($versions['coolify']['v4']['version'])->toBe('4.3.16')->and($versions['coolify']['nightly']['version'])->toBe('4.4-rc.1')->and($nightlyVersions)->toBe($versions);});diff --git a/versions.json b/versions.jsonindex 455918fdc0..a3a660f9cb 100644--- a/versions.json+++ b/versions.json@@ -1,7 +1,7 @@{"coolify": {"v4": {- "version": "4.3.15"+ "version": "4.3.16"},"nightly": {"version": "4.4-rc.1"