Pass to lamdbas by reference

This commit is contained in:
Simon Quigley 2025-01-29 15:11:34 -06:00
parent 2c82ddf9f3
commit a9721b0a37

View File

@ -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; }