Skip to content

Commit

Permalink
fix(daemon): start sync detached
Browse files Browse the repository at this point in the history
  • Loading branch information
LordTermor committed May 25, 2024
1 parent 5a4128d commit fd4be51
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions daemon/presentation/web-controllers/PackageController.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,10 @@ using namespace drogon;
drogon::Task<HttpResponsePtr>
PackageController::sync(drogon::HttpRequestPtr req) {
BXT_JWT_CHECK_PERMISSIONS("packages.sync", req)

co_await m_sync_service.sync_all();
drogon::async_run([this]() -> drogon::Task<void> {
co_await m_sync_service.sync_all();
co_return;
});

co_return HttpResponse::newHttpResponse();
}
Expand Down

0 comments on commit fd4be51

Please sign in to comment.