From 66dcd0cf3567c34a02be354851129e5fe50fb657 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=80=E5=88=80?= Date: Tue, 23 Jun 2020 17:38:52 +0800 Subject: [PATCH] =?UTF-8?q?perf:=20=E4=BC=98=E5=8C=96=20config-center?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/config-center/src/BootProcessListener.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/config-center/src/BootProcessListener.php b/src/config-center/src/BootProcessListener.php index 6ab92ea..de66385 100644 --- a/src/config-center/src/BootProcessListener.php +++ b/src/config-center/src/BootProcessListener.php @@ -45,9 +45,8 @@ class BootProcessListener implements ListenerInterface $this->log->info('tick begin'); $interval = config('config_center.interval', 1); $this->load(); - $that = $this; - Timer::tick($interval * 1000, function () use ($that) { - $that->load(); + Timer::tick($interval * 1000, function () { + $this->load(); }); }