Skip to content
Closed
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
9 changes: 6 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@
},
"require": {
"php": ">=8.1",
"cakephp/cakephp": "dev-5.next as 5.1.0",
"enqueue/simple-client": "^0.10",
"psr/log": "^3.0"
"cakephp/cakephp": "^5.1.0",
"psr/log": "^3.0",
"enqueue/enqueue": "^0.10",
"queue-interop/amqp-interop": "^0.8.2",
"queue-interop/queue-interop": "^0.8",
"symfony/config": "^5.4|^6.0|^7.0"
},
"require-dev": {
"cakephp/bake": "dev-3.next",
Expand Down
2 changes: 1 addition & 1 deletion src/Command/RequeueCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ public function execute(Arguments $args, ConsoleIo $io): void
'config' => $failedJob->config,
'priority' => $failedJob->priority,
'queue' => $failedJob->queue,
]
],
);

$failedJobsTable->deleteOrFail($failedJob);
Expand Down
2 changes: 1 addition & 1 deletion src/Command/WorkerCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ public function getOptionParser(): ConsoleOptionParser
'short' => 'a',
]);
$parser->setDescription(
'Runs a queue worker that consumes from the named queue.'
'Runs a queue worker that consumes from the named queue.',
);

return $parser;
Expand Down
6 changes: 3 additions & 3 deletions src/Consumption/LimitAttemptsExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ public function onResult(MessageResult $context): void

if ($attemptNumber >= $maxAttempts) {
$context->changeResult(
Result::reject(sprintf('The maximum number of %d allowed attempts was reached.', $maxAttempts))
Result::reject(sprintf('The maximum number of %d allowed attempts was reached.', $maxAttempts)),
);

$exception = (string)$message->getProperty('jobException');

$this->dispatchEvent(
'Consumption.LimitAttemptsExtension.failed',
['exception' => $exception, 'logger' => $context->getLogger()],
$jobMessage
$jobMessage,
);

return;
Expand All @@ -88,7 +88,7 @@ public function onResult(MessageResult $context): void
$producer->send($consumer->getQueue(), $newMessage);

$context->changeResult(
Result::reject('A copy of the message was sent with an incremented attempt count.')
Result::reject('A copy of the message was sent with an incremented attempt count.'),
);
}
}
2 changes: 1 addition & 1 deletion src/Consumption/LimitConsumedMessagesExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ protected function shouldBeStopped(LoggerInterface $logger): bool
$logger->debug(sprintf(
'[LimitConsumedMessagesExtension] Message consumption is interrupted since the message limit ' .
'reached. limit: "%s"',
$this->messageLimit
$this->messageLimit,
));

return true;
Expand Down
Loading
Loading