Skip to content
This repository was archived by the owner on Jul 4, 2025. It is now read-only.

Commit 36222f1

Browse files
authored
Merge pull request #1955 from janhq/chore/cherry-pick-bugfix
chore: cherry-pick: permission issue for default drogon uploads folder (#1870)
2 parents 2d74836 + 7ff92ce commit 36222f1

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

engine/main.cc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,9 @@ void RunServer(std::optional<std::string> host, std::optional<int> port,
201201
drogon::app().registerController(hw_ctl);
202202
drogon::app().registerController(config_ctl);
203203

204+
auto upload_path = std::filesystem::temp_directory_path() / "cortex-uploads";
205+
drogon::app().setUploadPath(upload_path.string());
206+
204207
LOG_INFO << "Server started, listening at: " << config.apiServerHost << ":"
205208
<< config.apiServerPort;
206209
LOG_INFO << "Please load your model";

engine/services/model_source_service.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ void ModelSourceService::SyncModelSource() {
430430
constexpr const int kIntervalCheck = 10 * 60;
431431
auto start_time = std::chrono::steady_clock::now();
432432
while (running_) {
433-
std::this_thread::sleep_for(std::chrono::milliseconds(500));
433+
std::this_thread::sleep_for(std::chrono::milliseconds(100));
434434
auto current_time = std::chrono::steady_clock::now();
435435
auto elapsed_time = std::chrono::duration_cast<std::chrono::seconds>(
436436
current_time - start_time)

0 commit comments

Comments
 (0)