hkc320 2024-09-02 16:17:12 +08:00
parent dbf19d75d8
commit 30a0a72804
3 changed files with 13 additions and 10 deletions

View File

@ -8,7 +8,8 @@ log_filesize = 16M
# worker_processes = auto # auto = ncpu
# worker_processes = auto
worker_processed = 0
worker_threads = auto
# worker_threads = auto
worker_threads = 1
host = 0.0.0.0
port = 44242

View File

@ -537,6 +537,14 @@ int main(int argc, char** argv)
exit(0);
}
// signal
signal_init(on_reload);
const char* signal = get_arg("s");
if( signal )
{
signal_handle(signal);
}
// g_conf_ctx
conf_ctx_init(&g_conf_ctx);
const char* confile = get_arg("c");
@ -553,13 +561,6 @@ int main(int argc, char** argv)
exit(0);
}
// signal
signal_init(on_reload);
const char* signal = get_arg("s");
if (signal)
{
signal_handle(signal);
}
#ifdef OS_UNIX
// daemon
@ -926,7 +927,7 @@ void worker_fn(void* userdata)
if (listenio == NULL)
{
hlogw("worker process finished");
hloge("worker process finished");
return;
}

View File

@ -34,7 +34,8 @@ bool OpDatabase::OpenDatabase(const std::string& server, const std::string& dbus
// 数据库连接配置
//std::string server = "tcp://127.0.0.1:3306";
//std::string dbuser = "root";
std::string password = "Hj57471000";
//std::string password = "Hj57471000";
std::string password = "L2ysc1s1kr";
//std::string database = "hjems";
// 创建连接