-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
A Pool with an intermittent connection to a server can put jobs into the default tube, even though calling useTube() followed immediately by put().
The useTube() in Pool
Lines 88 to 96 in 887a53e
| public function useTube(string $tube): void | |
| { | |
| foreach ($this->getAvailableConnections() as $connection) { | |
| try { | |
| $connection->useTube($tube); | |
| } catch (RuntimeException $e) { | |
| // ignore connections not responding | |
| } | |
| } |
ignores errors from a connection, so if the server which failed to set the correct tube is then chosen by the Pool for the put()
Lines 101 to 113 in 887a53e
| public function put( | |
| string $data, | |
| int $priority = self::DEFAULT_PRIORITY, | |
| int $delay = self::DEFAULT_DELAY, | |
| int $ttr = self::DEFAULT_TTR | |
| ): string { | |
| return $this->sendToOne( | |
| function (ConnectionInterface $connection, string $key) use ($data, $priority, $delay, $ttr): string { | |
| $jobId = $connection->put($data, $priority, $delay, $ttr); | |
| return $this->combineId($key, $jobId); | |
| } | |
| ); | |
| } |
the job is put in the default queue.
Metadata
Metadata
Assignees
Labels
No labels