You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on May 31, 2022. It is now read-only.
I have searched for a similar issue in our bug tracker and didn't find any solutions.
What happened?
There is the loop for handling the received task.
while ($task = $this->consumer->waitTask()) {
try {
$this->logger->debug('Processing task');
$this->eventHandler->handle($task->getPayload()); <----// HERE can be a logical error /* @var ReceivedTaskInterface */$task->complete();
} catch (Throwable$throwable) { <--- // CATCH this logical error here and try to attempt again, when// attemps are over, our loop procceeds working like infitity mode, // and // we see in console the error bellow$this->logger->warning('Got exception on job handling: ' . $throwable->getMessage(), $throwable->getTrace());
$retries = max(
(int) $task->getHeaderLine('attempts') - 1,
0
);
if (0 == $retries || !$this->shouldBeRestarted) {
try {
$task->fail($throwable, false);
} catch (Exception) {
$this->logger->alert($throwable->getMessage());
}
$this->logger->warning('Failed to complete task');
} else {
$this->logger->info('Restarting failed task, retries left: ' . $retries);
try {
/** * @psalm-suppress ArgumentTypeCoercion */$task->withHeader('attempts', (string) $retries)
->withDelay($this->resendDelaySeconds)
->fail($throwable, true);
} catch (Exception) {
$this->logger->alert($throwable->getMessage());
}
}
}
}
Version
v2.6.6
Relevant log output
{"level":"ERROR","ts":"2022-01-05T13:26:31.915Z","logger":"jobs ","msg":"job negatively acknowledged","error":"jobs_handle_response: protocol.errorResp.Headers: ReadMapCB: expect { or n, but found [, error found in #10 byte of ...|headers\":[]}|..., bigger context ...|in}\",\"requeue\":false,\"delay_seconds\":0,\"headers\":[]}|..."}
The text was updated successfully, but these errors were encountered:
No duplicates 🥲.
What happened?
There is the loop for handling the received task.
Version
v2.6.6
Relevant log output
The text was updated successfully, but these errors were encountered: