Refactor schedule checker
This commit is contained in:
parent
de4aaabcc9
commit
a303e9bf95
2 changed files with 5 additions and 2 deletions
|
|
@ -23,6 +23,7 @@ use App\Jobs\Util\SchedulerCheck;
|
|||
use App\Jobs\Util\SendFailedEmails;
|
||||
use App\Jobs\Util\UpdateExchangeRates;
|
||||
use App\Jobs\Util\VersionCheck;
|
||||
use App\Models\Account;
|
||||
use App\Utils\Ninja;
|
||||
use Illuminate\Console\Scheduling\Schedule;
|
||||
use Illuminate\Foundation\Console\Kernel as ConsoleKernel;
|
||||
|
|
@ -69,6 +70,10 @@ class Kernel extends ConsoleKernel
|
|||
|
||||
$schedule->job(new SchedulerCheck)->daily()->withoutOverlapping();
|
||||
|
||||
$schedule->call(function () {
|
||||
Account::whereNotNull('id')->update(['is_scheduler_running' => true]);
|
||||
})->everyFiveMinutes()->withoutOverlapping();
|
||||
|
||||
/* Run hosted specific jobs */
|
||||
if (Ninja::isHosted()) {
|
||||
|
||||
|
|
|
|||
|
|
@ -38,8 +38,6 @@ class SchedulerCheck implements ShouldQueue
|
|||
{
|
||||
set_time_limit(0);
|
||||
|
||||
Account::whereNotNull('id')->update(['is_scheduler_running' => true]);
|
||||
|
||||
if(config('ninja.app_version') != base_path('VERSION.txt'))
|
||||
{
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue