Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions cortex-cpp/addon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ static Napi::Env* s_env = nullptr;
void start(const int port = 3929) {
int thread_num = 1;
std::string host = "127.0.0.1";
std::string uploads_folder_path;
int logical_cores = std::thread::hardware_concurrency();
int drogon_thread_num = std::max(thread_num, logical_cores);
#ifdef CORTEX_CPP_VERSION
Expand All @@ -40,10 +39,6 @@ void start(const int port = 3929) {
LOG_INFO << "Please load your model";
drogon::app().addListener(host, port);
drogon::app().setThreadNum(drogon_thread_num);
if (!uploads_folder_path.empty()) {
LOG_INFO << "Drogon uploads folder is at: " << uploads_folder_path;
drogon::app().setUploadPath(uploads_folder_path);
}
LOG_INFO << "Number of thread is:" << drogon::app().getThreadNum();

drogon::app().run();
Expand Down
10 changes: 0 additions & 10 deletions cortex-cpp/main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ int main(int argc, char* argv[]) {
int thread_num = 1;
std::string host = "127.0.0.1";
int port = 3928;
std::string uploads_folder_path;

// Number of cortex-cpp threads
if (argc > 1) {
Expand All @@ -61,11 +60,6 @@ int main(int argc, char* argv[]) {
port = std::atoi(argv[3]); // Convert string argument to int
}

// Uploads folder path
if (argc > 4) {
uploads_folder_path = argv[4];
}

int logical_cores = std::thread::hardware_concurrency();
int drogon_thread_num = std::max(thread_num, logical_cores);
// cortex_utils::nitro_logo();
Expand All @@ -79,10 +73,6 @@ int main(int argc, char* argv[]) {
LOG_INFO << "Please load your model";
drogon::app().addListener(host, port);
drogon::app().setThreadNum(drogon_thread_num);
if (!uploads_folder_path.empty()) {
LOG_INFO << "Drogon uploads folder is at: " << uploads_folder_path;
drogon::app().setUploadPath(uploads_folder_path);
}
LOG_INFO << "Number of thread is:" << drogon::app().getThreadNum();

drogon::app().run();
Expand Down