Skip to content

Commit 8941081

Browse files
committed
formatting
1 parent b024b37 commit 8941081

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/Jobs/ProcessPendingUpdates.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,14 +50,16 @@ public function handle(EntriesRepository $repository)
5050
{
5151
$this->attempt++;
5252

53+
$delay = config('telescope.queue.delay');
54+
5355
$repository->update($this->pendingUpdates)->whenNotEmpty(
5456
fn ($pendingUpdates) => static::dispatchIf(
5557
$this->attempt < 3, $pendingUpdates, $this->attempt
5658
)->onConnection(
5759
config('telescope.queue.connection')
5860
)->onQueue(
5961
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),
6163
);
6264
}
6365
}

src/Telescope.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -663,13 +663,15 @@ public static function store(EntriesRepository $storage)
663663
$updateResult = $storage->update(static::collectUpdates($batchId)) ?: Collection::make();
664664

665665
if (! isset($_ENV['VAPOR_SSM_PATH'])) {
666+
$delay = config('telescope.queue.delay');
667+
666668
$updateResult->whenNotEmpty(fn ($pendingUpdates) => rescue(fn () => ProcessPendingUpdates::dispatch(
667669
$pendingUpdates,
668670
)->onConnection(
669671
config('telescope.queue.connection')
670672
)->onQueue(
671673
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)));
673675
}
674676

675677
if ($storage instanceof TerminableRepository) {

0 commit comments

Comments
 (0)