Switch to drogon
All checks were successful
Build-Test-Publish / build (linux/amd64) (push) Successful in 56s
Build-Test-Publish / build (linux/arm64) (push) Successful in 1m40s
Build-Test-Publish / create-manifest (push) Successful in 18s

This commit is contained in:
Your Name
2025-06-15 16:19:23 +12:00
parent 69de93c793
commit eedd39a533
10 changed files with 538 additions and 10738 deletions

View File

@@ -7,6 +7,7 @@
#include <atomic>
#include <memory>
#include <thread>
#include <drogon/drogon.h>
#include "version.hpp"
@@ -68,15 +69,6 @@ bool initialize_server() {
}
g_server = std::make_unique<Server>(config);
// Start server in a separate thread
g_server_thread = std::thread([&]() {
if (!g_server->start()) {
std::cerr << "Failed to start server" << std::endl;
g_running = false;
}
});
return true;
}
@@ -142,13 +134,12 @@ int main(int argc, char* argv[]) {
return 1;
}
// Main loop - wait for signals
while (g_running) {
std::this_thread::sleep_for(std::chrono::milliseconds(100));
// Start server in main thread
if (!g_server->start()) {
std::cerr << "Failed to start server" << std::endl;
return 1;
}
// Graceful shutdown
stop_server();
return 0;
}