We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fe00dfb commit c88afd5Copy full SHA for c88afd5
src/Core/Scheduler.php
@@ -30,6 +30,17 @@ public static function schedule(Schedule $schedule)
30
31
$schedule->call(function () use ($schedulableQueue, $scheduleConfig) {
32
$className = $schedulableQueue->class_name;
33
+
34
+ $lockKey = 'QUEUE_LOCK_' . $schedulableQueue->class_name . '_' . date('Y-m-d-H-i');
35
36
+ if (\Cache::has($lockKey)) {
37
+ return;
38
+ }
39
40
+ $expiresAt = now()->addMinutes(10);
41
42
+ \Cache::put($lockKey, '1', $expiresAt);
43
44
if ($scheduleConfig->props && is_array($scheduleConfig->props)) {
45
foreach($scheduleConfig->props as $prop) {
46
$job = (new $className());
0 commit comments