Commit 8941081 1 parent b024b37 commit 8941081 Copy full SHA for 8941081
File tree 2 files changed +6
-2
lines changed
2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,16 @@ public function handle(EntriesRepository $repository)
50
50
{
51
51
$ this ->attempt ++;
52
52
53
+ $ delay = config ('telescope.queue.delay ' );
54
+
53
55
$ repository ->update ($ this ->pendingUpdates )->whenNotEmpty (
54
56
fn ($ pendingUpdates ) => static ::dispatchIf (
55
57
$ this ->attempt < 3 , $ pendingUpdates , $ this ->attempt
56
58
)->onConnection (
57
59
config ('telescope.queue.connection ' )
58
60
)->onQueue (
59
61
config ('telescope.queue.queue ' )
60
- )->delay (config ( ' telescope.queue. delay' ) ? now ()->addSeconds (config ( ' telescope.queue. delay' ) ) : null ),
62
+ )->delay (is_numeric ( $ delay) && $ delay > 0 ? now ()->addSeconds ($ delay ) : null ),
61
63
);
62
64
}
63
65
}
Original file line number Diff line number Diff line change @@ -663,13 +663,15 @@ public static function store(EntriesRepository $storage)
663
663
$ updateResult = $ storage ->update (static ::collectUpdates ($ batchId )) ?: Collection::make ();
664
664
665
665
if (! isset ($ _ENV ['VAPOR_SSM_PATH ' ])) {
666
+ $ delay = config ('telescope.queue.delay ' );
667
+
666
668
$ updateResult ->whenNotEmpty (fn ($ pendingUpdates ) => rescue (fn () => ProcessPendingUpdates::dispatch (
667
669
$ pendingUpdates ,
668
670
)->onConnection (
669
671
config ('telescope.queue.connection ' )
670
672
)->onQueue (
671
673
config ('telescope.queue.queue ' )
672
- )->delay (config ( ' telescope.queue. delay' ) ? now ()->addSeconds (config ( ' telescope.queue. delay' ) ) : null )));
674
+ )->delay (is_numeric ( $ delay) && $ delay > 0 ? now ()->addSeconds ($ delay ) : null )));
673
675
}
674
676
675
677
if ($ storage instanceof TerminableRepository) {
You can’t perform that action at this time.
0 commit comments