feat: workerman 增加热重载

This commit is contained in:
xboard committed 2024-05-23 11:40:52 +08:00
1 parent 23d17f362a
commit aa8f648179
4 files changed
+60 -9

No files matched your search

@@ -188,7 +188,10 @@ class ConfigController extends Controller
);
}
}
// 如果是workerman环境,则触发reload
if(isset(get_defined_constants(true)['user']['Workerman'])){
posix_kill(posix_getppid(), SIGUSR1);
}
Cache::forget('admin_settings');
// \Artisan::call('horizon:terminate'); //重启队列使配置生效
return $this->success(true);