fix review

This commit is contained in:
sunxyw
2022-03-21 23:28:57 +08:00
parent bc7d5871e4
commit 8105892b6e
2 changed files with 4 additions and 21 deletions

View File

@@ -83,9 +83,9 @@ class EventManager
}
$conf = ZMConfig::get('global', 'worker_cache') ?? ['worker' => 0];
if (server()->worker_id == $conf['worker']) {
run_repeating(static function () {
zm_timer_tick(ZMConfig::get('global', 'light_cache')['auto_save_interval'] * 1000, static function () {
LightCache::savePersistence();
}, ZMConfig::get('global', 'light_cache')['auto_save_interval'] * 1000);
});
}
}
}