This commit is contained in:
2020-09-10 19:30:49 +08:00
parent 752db307a8
commit 1fe062b9cf
2 changed files with 8 additions and 2 deletions
+7 -1
View File
@@ -81,7 +81,13 @@ class Queue extends \Snowflake\Process\Process
*/
public function delivery(Consumer $consumer, $score = 0)
{
$this->waiting->add($consumer, $score);
try {
$consumer->onWaiting();
} catch (\Throwable $exception) {
$this->application->error($exception->getMessage());
} finally {
$this->waiting->add($consumer, $score);
}
}