This commit is contained in:
2021-02-20 15:21:42 +08:00
parent 60805d5f4c
commit 52bf002be5
14 changed files with 20 additions and 46 deletions
+1 -1
View File
@@ -89,7 +89,7 @@ class Producer extends Component
});
$event = Snowflake::app()->getEvent();
$event->on(Event::EVENT_AFTER_REQUEST, [$this, 'flush']);
$event->on(Event::SYSTEM_RESOURCE_RELEASES, [$this, 'flush']);
if ($this->producer === null) {
$this->producer = Snowflake::createObject(\RdKafka\Producer::class, [$this->conf]);