Skip to content

Commit de00336

Browse files
committed
fix: #78 dont ask db for jobs if running in console
1 parent 0884fc9 commit de00336

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bootstrap/app.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
use App\Http\Middleware\EnsureTeamSubscription;
77
use App\Http\Middleware\HandleInertiaRequests;
88
use App\Jobs\CheckAgentUpdates;
9-
use App\Models\DeploymentData\CronPreset;
109
use App\Models\Service;
1110
use Illuminate\Console\Scheduling\Schedule;
1211
use Illuminate\Foundation\Application;
@@ -49,6 +48,10 @@
4948
//
5049
})
5150
->withSchedule(function (Schedule $schedule) {
51+
if (app()->runningInConsole()) {
52+
return;
53+
}
54+
5255
$schedule->job(CheckAgentUpdates::class)
5356
->everyMinute()
5457
->onOneServer()

0 commit comments

Comments
 (0)