Skip to content

Commit

Permalink
add queue connection customization to the Job self dispatch (#1478)
Browse files Browse the repository at this point in the history
* add queue connection customization to the Job self dispatch

* Update ProcessPendingUpdates.php

---------

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
ariaieboy and taylorotwell authored May 9, 2024
1 parent 68dacc6 commit ae5c28c
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Jobs/ProcessPendingUpdates.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ public function handle(EntriesRepository $repository)
$repository->update($this->pendingUpdates)->whenNotEmpty(
fn ($pendingUpdates) => static::dispatchIf(
$this->attempt < 3, $pendingUpdates, $this->attempt
)->onConnection(
config('telescope.queue.connection')
)->onQueue(
config('telescope.queue.queue')
)->delay(now()->addSeconds(10)),
);
}
Expand Down

0 comments on commit ae5c28c

Please sign in to comment.