|
4 | 4 | #include "download.h" |
5 | 5 |
|
6 | 6 | #include <cpp-httplib/httplib.h> |
| 7 | +#include <sheredom/subprocess.h> |
7 | 8 |
|
8 | 9 | #include <functional> |
9 | 10 | #include <thread> |
|
12 | 13 | #include <cstring> |
13 | 14 | #include <atomic> |
14 | 15 | #include <chrono> |
15 | | -#include <unordered_set> |
16 | 16 |
|
17 | 17 | #ifdef _WIN32 |
18 | 18 | #include <winsock2.h> |
@@ -84,7 +84,7 @@ static std::vector<local_model> list_local_models(const std::string & dir) { |
84 | 84 | } |
85 | 85 |
|
86 | 86 | std::vector<local_model> models; |
87 | | - auto scan_subdir = [&models](const std::string & subdir_path, const std::string name) { |
| 87 | + auto scan_subdir = [&models](const std::string & subdir_path, const std::string & name) { |
88 | 88 | auto files = fs_list(subdir_path, false); |
89 | 89 | common_file_info model_file; |
90 | 90 | common_file_info first_shard_file; |
@@ -292,6 +292,7 @@ static std::vector<char *> to_char_ptr_array(const std::vector<std::string> & ve |
292 | 292 | std::vector<server_model_meta> server_models::get_all_meta() { |
293 | 293 | std::lock_guard<std::mutex> lk(mutex); |
294 | 294 | std::vector<server_model_meta> result; |
| 295 | + result.reserve(mapping.size()); |
295 | 296 | for (const auto & [name, inst] : mapping) { |
296 | 297 | result.push_back(inst.meta); |
297 | 298 | } |
@@ -363,7 +364,7 @@ void server_models::load(const std::string & name, bool auto_load) { |
363 | 364 |
|
364 | 365 | inst.subproc = std::make_shared<subprocess_s>(); |
365 | 366 | { |
366 | | - std::string exec_path = get_server_exec_path().string(); |
| 367 | + //std::string exec_path = get_server_exec_path().string(); |
367 | 368 | SRV_INF("spawning server instance with name=%s on port %d\n", inst.meta.name.c_str(), inst.meta.port); |
368 | 369 |
|
369 | 370 | std::vector<std::string> child_args; |
|
0 commit comments