обновил сбор статистики, теперь он выполняется отдельно от загрузки состояния и может работать на FULL RATE. К тому же, статистика доступна только на SCPC модеме
This commit is contained in:
@@ -480,7 +480,7 @@ public:
|
||||
rep.headers.push_back({.name = "Content-Type", .value = toString(mime_types::json)});
|
||||
rep.content.insert(rep.content.end(), result.c_str(), result.c_str() + result.size());
|
||||
}));
|
||||
|
||||
#ifdef MODEM_IS_SCPC
|
||||
s.resources.emplace_back(std::make_unique<http::auth::AuthRequiredResource>("/dev/settings", this->auth, http::auth::User::DEVELOPER, [this](const auto& req, auto& rep) {
|
||||
std::string result;
|
||||
if (req.method == "GET") {
|
||||
@@ -519,6 +519,7 @@ public:
|
||||
rep.content.clear();
|
||||
http::resource::loadFile("/tmp/weblog-statistics.csv", rep.content);
|
||||
}));
|
||||
#endif
|
||||
}
|
||||
|
||||
~ServerResources() = default;
|
||||
|
||||
Reference in New Issue
Block a user