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
+6
View File
@@ -81,8 +81,14 @@ class Queue extends \Snowflake\Process\Process
*/ */
public function delivery(Consumer $consumer, $score = 0) public function delivery(Consumer $consumer, $score = 0)
{ {
try {
$consumer->onWaiting();
} catch (\Throwable $exception) {
$this->application->error($exception->getMessage());
} finally {
$this->waiting->add($consumer, $score); $this->waiting->add($consumer, $score);
} }
}
/** /**
+1 -1
View File
@@ -169,7 +169,7 @@ class BaseObject implements Configure
* @param string $message * @param string $message
* @param string|null $method * @param string|null $method
* @param string|null $file * @param string|null $file
* @throws Exception * @throws
*/ */
public function error($message, $method = null, $file = null) public function error($message, $method = null, $file = null)
{ {