Skip to content

Commit

Permalink
add config option for queue
Browse files Browse the repository at this point in the history
  • Loading branch information
ariaieboy committed Apr 17, 2024
1 parent 7aa62a1 commit 2bf49a0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions config/telescope.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,20 @@
],
],

/*
|--------------------------------------------------------------------------
| Telescope Queue Config
|--------------------------------------------------------------------------
|
| This configuration options determines the queue config that will be
| used for ProcessPendingUpdates job, by passing the null value
| we use the default queue or change it to a custom queue.
|
*/
'queue'=>[
'connection' => env('TELESCOPE_QUEUE_CONNECTION', null),
'queue' => env('TELESCOPE_QUEUE', null),
],
/*
|--------------------------------------------------------------------------
| Telescope Master Switch
Expand Down
2 changes: 1 addition & 1 deletion src/Telescope.php
Original file line number Diff line number Diff line change
Expand Up @@ -665,7 +665,7 @@ public static function store(EntriesRepository $storage)
if (! isset($_ENV['VAPOR_SSM_PATH'])) {
$updateResult->whenNotEmpty(fn ($pendingUpdates) => rescue(fn () => ProcessPendingUpdates::dispatch(
$pendingUpdates,
)->delay(now()->addSeconds(10))));
)->onQueue(config('telescope.queue.queue',null))->onConnection(config('telescope.queue.connection',null))->delay(now()->addSeconds(10))));
}

if ($storage instanceof TerminableRepository) {
Expand Down

0 comments on commit 2bf49a0

Please sign in to comment.