From a9721b0a379aba6daa4c2a0909e5671574b06e4e Mon Sep 17 00:00:00 2001 From: Simon Quigley Date: Wed, 29 Jan 2025 15:11:34 -0600 Subject: [PATCH] Pass to lamdbas by reference --- cpp/web_server.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cpp/web_server.cpp b/cpp/web_server.cpp index c2727e8..26cc730 100644 --- a/cpp/web_server.cpp +++ b/cpp/web_server.cpp @@ -199,7 +199,7 @@ bool WebServer::start_server(quint16 port) { } } - expire_tokens_thread_ = std::jthread(run_task_every, 60, [this, lubuntuci] { + expire_tokens_thread_ = std::jthread(run_task_every, 60, [this, &lubuntuci] mutable { QSqlQuery expired_tokens(get_thread_connection()); QString current_time = QDateTime::currentDateTime().toString(Qt::ISODate); @@ -216,7 +216,7 @@ bool WebServer::start_server(quint16 port) { } }); - process_sources_thread_ = std::jthread(run_task_every, 10, [this, all_repos, proposed, lubuntuci, job_statuses] { + process_sources_thread_ = std::jthread(run_task_every, 10, [this, &all_repos, &proposed, &lubuntuci, &job_statuses] mutable { for (auto pkgconf : all_repos) { if (!pkgconf->can_check_source_upload()) { continue; } @@ -241,7 +241,7 @@ bool WebServer::start_server(quint16 port) { } }); - process_binaries_thread_ = std::jthread(run_task_every, 10, [this, all_repos, proposed, lubuntuci, job_statuses] { + process_binaries_thread_ = std::jthread(run_task_every, 10, [this, &all_repos, &proposed, &lubuntuci, &job_statuses] mutable { for (auto pkgconf : all_repos) { if (!pkgconf->can_check_builds()) { continue; }