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
+2 -2
View File
@@ -37,8 +37,8 @@ class Redis extends Component
public function init()
{
$event = Snowflake::app()->getEvent();
$event->on(Event::RELEASE_ALL, [$this, 'destroy']);
$event->on(Event::EVENT_AFTER_REQUEST, [$this, 'release']);
$event->on(Event::SYSTEM_RESOURCE_CLEAN, [$this, 'destroy']);
$event->on(Event::SYSTEM_RESOURCE_RELEASES, [$this, 'release']);
$event->on(Event::SERVER_WORKER_START, [$this, 'createPool']);
$event->on(Event::SERVER_TASK_START, [$this, 'createPool']);
}