Move DB queries into jobs, so that the scheduler and artisan command calls doesnt evaluate them until the job is actually run
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 35s
Create Docker Image / Final Docker Image Manifest (push) Successful in 9s

This commit is contained in:
2024-07-06 19:56:56 +10:00
parent 844d509834
commit 3c7e2bbbc9
3 changed files with 18 additions and 18 deletions

View File

@@ -34,11 +34,11 @@ class BroadbandTraffic extends Command
if ($this->option('supplier')) {
$o = Supplier::where('name','like',$this->option('supplier'))->singleOrFail();
Job::dispatchSync($o);
Job::dispatchSync($o->id);
return;
}
foreach (Supplier::active()->get() as $o)
Job::dispatchSync($o);
Job::dispatchSync($o->id);
}
}