Skip to content

Commit

Permalink
upd queue
Browse files Browse the repository at this point in the history
  • Loading branch information
phphleb committed Dec 13, 2024
1 parent a4efce0 commit d920d82
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions HlebQueueBootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,13 +158,16 @@ public function load(?string $commandClass = null, array $arguments = []): int
} catch (\AsyncExitException $e) {
echo $e->getMessage();

} catch (Throwable) {
/*
* If the error is caught at the initialization stage, then it must be logged independently.
*
* Если ошибка будет перехвачена на этапе инициализации, то её нужно самостоятельно залогировать.
*/
} catch (Throwable $t) {
$this->logsPostProcessing();
$this->errorLog($t);
if ($this->mode !== self::ASYNC_MODE) {
throw $t;
}
$status = false;

} finally {
$this->logsPostProcessing();
if ($this->mode === self::ASYNC_MODE) {
self::prepareAsyncRequestData($this->config, self::$processNumber);
}
Expand Down

0 comments on commit d920d82

Please sign in to comment.