Skip to content

Commit f932f62

Browse files
committed
Restart queue every hour
1 parent a3ee72a commit f932f62

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/Core/Scheduler.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ class Scheduler
1111
{
1212
public static function schedule(Schedule $schedule)
1313
{
14+
/**
15+
* CUSTOM SCHEDULE
16+
*/
17+
1418
/** @var Carbon $dateNow */
1519
$dateNow = now();
1620
$schedulableQueues = QueueConfigRepository::findSchedulables();
@@ -73,6 +77,13 @@ public static function schedule(Schedule $schedule)
7377
event(new ScheduleError('Schedule Error - ' . $schedulableQueue->name . ' ' . $e->getMessage(), ['queue' => $schedulableQueue->name]));
7478
}
7579
}
80+
81+
82+
/**
83+
* RESTAR QUEUE EVERY HOUR
84+
*/
85+
86+
$schedule->command('queue:restart')->hourly();
7687
}
7788

7889
}

0 commit comments

Comments
 (0)