Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Illuminate/Foundation/Concerns/ResolvesDumpSource.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ trait ResolvesDumpSource
'atom' => 'atom://core/open/file?filename={file}&line={line}',
'cursor' => 'cursor://file/{file}:{line}',
'emacs' => 'emacs://open?url=file://{file}&line={line}',
'fleet' => 'fleet://open?file={file}&line={line}',
'idea' => 'idea://open?file={file}&line={line}',
'kiro' => 'kiro://file/{file}:{line}',
'macvim' => 'mvim://open/?url=file://{file}&line={line}',
Expand Down
16 changes: 12 additions & 4 deletions src/Illuminate/Queue/FailoverQueue.php
Original file line number Diff line number Diff line change
Expand Up @@ -86,15 +86,18 @@ public function creationTimeOfOldestPendingJob($queue = null)
*/
public function push($job, $data = '', $queue = null)
{
$lastException = null;

foreach ($this->connections as $connection) {
try {
return $this->manager->connection($connection)->push($job, $data, $queue);
} catch (Throwable $e) {
$lastException = $e;
$this->events->dispatch(new QueueFailedOver($connection, $job));
}
}

throw $e;
throw $lastException ?? new \RuntimeException('No available connections to push the job.');
}

/**
Expand All @@ -106,15 +109,17 @@ public function push($job, $data = '', $queue = null)
*/
public function pushRaw($payload, $queue = null, array $options = [])
{
$lastException = null;

foreach ($this->connections as $connection) {
try {
return $this->manager->connection($connection)->pushRaw($payload, $queue, $options);
} catch (Throwable $e) {
//
$lastException = $e;
}
}

throw $e;
throw $lastException ?? new \RuntimeException('No available connections to push the raw payload.');
}

/**
Expand All @@ -128,15 +133,18 @@ public function pushRaw($payload, $queue = null, array $options = [])
*/
public function later($delay, $job, $data = '', $queue = null)
{
$lastException = null;

foreach ($this->connections as $connection) {
try {
return $this->manager->connection($connection)->later($delay, $job, $data, $queue);
} catch (Throwable $e) {
$lastException = $e;
$this->events->dispatch(new QueueFailedOver($connection, $job));
}
}

throw $e;
throw $lastException ?? new \RuntimeException('No available connections to schedule the job.');
}

/**
Expand Down