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);
}
}
+1 -1
View File
@@ -169,7 +169,7 @@ class BaseObject implements Configure
* @param string $message
* @param string|null $method
* @param string|null $file
* @throws Exception
* @throws
*/
public function error($message, $method = null, $file = null)
{