|
|
|
@ -639,7 +639,11 @@ std::string CiLogic::queue_pull_tarball(std::vector<std::shared_ptr<PackageConf>
|
|
|
|
|
std::mutex task_assignment_mutex;
|
|
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
std::vector<std::future<void>> futures;
|
|
|
|
|
for (auto &r : repos) {
|
|
|
|
|
futures.push_back(std::async(std::launch::async, [this, &task_queue, &job_statuses,
|
|
|
|
|
&encountered_items, &task_assignment_mutex,
|
|
|
|
|
&r]() mutable {
|
|
|
|
|
{
|
|
|
|
|
std::lock_guard<std::mutex> lock(task_assignment_mutex);
|
|
|
|
|
auto found_it = encountered_items.find(r->package->name);
|
|
|
|
@ -655,7 +659,7 @@ std::string CiLogic::queue_pull_tarball(std::vector<std::shared_ptr<PackageConf>
|
|
|
|
|
r->packaging_commit = existing_item->first_pkgconf->packaging_commit;
|
|
|
|
|
r->upstream_commit = existing_item->first_pkgconf->upstream_commit;
|
|
|
|
|
r->sync();
|
|
|
|
|
continue;
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
// REAL pull
|
|
|
|
@ -692,7 +696,9 @@ std::string CiLogic::queue_pull_tarball(std::vector<std::shared_ptr<PackageConf>
|
|
|
|
|
new_item->first_tarball_task = r->get_task_by_jobstatus(job_statuses->at("tarball"));
|
|
|
|
|
encountered_items[r->package->name] = new_item;
|
|
|
|
|
}
|
|
|
|
|
}));
|
|
|
|
|
}
|
|
|
|
|
for (auto& future : futures) future.get();
|
|
|
|
|
msg = "Succeeded";
|
|
|
|
|
} catch (...) {
|
|
|
|
|
msg = "Failed";
|
|
|
|
|