refactor
All checks were successful
BlockStorage/repertory/pipeline/head This commit looks good

This commit is contained in:
Scott E. Graves 2025-03-15 19:20:58 -05:00
parent 462ebe6fcf
commit abd7e24b5e

View File

@ -113,8 +113,6 @@ handlers::handlers(mgmt_app_config *config, httplib::Server *server)
handle_put_set_value_by_name(req, res); handle_put_set_value_by_name(req, res);
}); });
event_system::instance().start();
static std::atomic<httplib::Server *> this_server{server_}; static std::atomic<httplib::Server *> this_server{server_};
static const auto quit_handler = [](int /* sig */) { static const auto quit_handler = [](int /* sig */) {
auto *ptr = this_server.load(); auto *ptr = this_server.load();
@ -158,6 +156,8 @@ handlers::handlers(mgmt_app_config *config, httplib::Server *server)
return; return;
} }
event_system::instance().start();
server_->listen("127.0.0.1", config_->get_api_port()); server_->listen("127.0.0.1", config_->get_api_port());
this_server = nullptr; this_server = nullptr;
} }