Trying to bugfix
This commit is contained in:
parent
746e5afa8f
commit
696d7fd299
1 changed files with 5 additions and 0 deletions
|
@ -51,6 +51,7 @@ class RunMonitoring extends Command
|
||||||
$rounds = $this->argument('rounds') ?? $this->rounds;
|
$rounds = $this->argument('rounds') ?? $this->rounds;
|
||||||
|
|
||||||
// Getting pending tasks
|
// Getting pending tasks
|
||||||
|
try {
|
||||||
$tasks = DB::table('tasks')
|
$tasks = DB::table('tasks')
|
||||||
->where(function($query) {
|
->where(function($query) {
|
||||||
$query->whereRaw('DATE_SUB(now(), INTERVAL frequency SECOND) > last_execution');
|
$query->whereRaw('DATE_SUB(now(), INTERVAL frequency SECOND) > last_execution');
|
||||||
|
@ -61,6 +62,10 @@ class RunMonitoring extends Command
|
||||||
->take($rounds)
|
->take($rounds)
|
||||||
->get()
|
->get()
|
||||||
;
|
;
|
||||||
|
}
|
||||||
|
catch (Exception $e) {
|
||||||
|
echo 'ERROR : '.$e->getMessage();
|
||||||
|
}
|
||||||
|
|
||||||
if (is_null($tasks) || count($tasks) == 0) {
|
if (is_null($tasks) || count($tasks) == 0) {
|
||||||
$this->info('No task to process, going back to sleep');
|
$this->info('No task to process, going back to sleep');
|
||||||
|
|
Loading…
Add table
Reference in a new issue