Skip to content

Commit

Permalink
update event
Browse files Browse the repository at this point in the history
  • Loading branch information
hsldymq committed Jun 20, 2019
1 parent 4ea71f7 commit 97332cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Dispatcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
*
* @event patrolling 进行一次僵尸进程检查周期
*
* @event received 从消息队列收到一条消息
* @event consumed 从消息队列消费了一条消息
* 参数: array $message, Dispatcher $master
*
* @event processed 一条amqp消息被worker成功处理
* @event processed 一条队列消息被worker成功处理
* 参数: string $workerID, Dispatcher $master
*
* @event workerExit worker退出
Expand Down Expand Up @@ -301,7 +301,6 @@ public function onConsume(
],
'content' => $AMQPMessage->content,
];
$this->errorlessEmit('received', [$message]);

if ($reachedBefore) {
$this->cachedMessages->push($message);
Expand Down Expand Up @@ -482,6 +481,7 @@ private function dispatch(array $message): string
}
$this->stat['consumed']++;
$this->workersInfo[$workerID]['sent']++;
$this->errorlessEmit('consumed', [$message]);

return $workerID;
}
Expand Down

0 comments on commit 97332cc

Please sign in to comment.