feat(gateway): 启用 users.json 后台重载扫描线程

Co-Authored-By: Claude Code <[email protected]>
This commit is contained in:
adminandClaude Code committed 2026-11-10 20:32:48 +08:00
1 parent 377636c014
commit 6f4c290d43
1 file changed
+3
+3
View File
@@ -331,6 +331,9 @@ unsafe extern "C" fn init_process(_cycle: *mut ngx_cycle_t) -> ngx_int_t {
Ok(false) => {}
Err(e) => util::log_err(&format!("[ipass] 初始化管理员失败: {e}")),
}
// users.json 变更自动生效:后台扫描线程(必须在 worker 期 spawn ——
// master 期 fork 会把持锁状态带进子进程,见 reloader.rs 顶部注释)
ipass_core::reloader::worker_spawn();
Status::NGX_OK.into()
}