replace deprecated functions

This commit is contained in:
sunxyw
2022-03-21 20:49:09 +08:00
parent 680e6a8c5f
commit bc7d5871e4
3 changed files with 11 additions and 11 deletions

View File

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