summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/other_tools/just_mr/fetch.cpp10
-rw-r--r--src/other_tools/ops_maps/content_cas_map.cpp13
-rw-r--r--src/other_tools/ops_maps/content_cas_map.hpp5
3 files changed, 11 insertions, 17 deletions
diff --git a/src/other_tools/just_mr/fetch.cpp b/src/other_tools/just_mr/fetch.cpp
index c4450c2a..1f4a04d1 100644
--- a/src/other_tools/just_mr/fetch.cpp
+++ b/src/other_tools/just_mr/fetch.cpp
@@ -309,15 +309,7 @@ auto MultiRepoFetch(std::shared_ptr<Configuration> const& config,
repo_fetch_map.ConsumeAfterKeysReady(
&ts,
repos_to_fetch,
- [&failed](auto const& values) {
- // report any fetch fails
- for (auto const& val : values) {
- if (not *val) {
- failed = true;
- break;
- }
- }
- },
+ []([[maybe_unused]] auto const& values) {},
[&failed](auto const& msg, bool fatal) {
Logger::Log(fatal ? LogLevel::Error : LogLevel::Warning,
"While performing just-mr fetch:\n{}",
diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp
index cd72d642..864d4bf0 100644
--- a/src/other_tools/ops_maps/content_cas_map.cpp
+++ b/src/other_tools/ops_maps/content_cas_map.cpp
@@ -45,7 +45,7 @@ auto CreateContentCASMap(LocalPathsPtr const& just_mr_paths,
// separate logic if we need a pure fetch
if (key.fetch_only) {
if (cas.BlobPath(digest, /*is_executable=*/false)) {
- (*setter)(true);
+ (*setter)(nullptr);
return;
}
JustMRProgress::Instance().TaskTracker().Start(key.origin);
@@ -59,7 +59,7 @@ auto CreateContentCASMap(LocalPathsPtr const& just_mr_paths,
// check if content is in CAS now
if (cas.BlobPath(digest, /*is_executable=*/false)) {
JustMRProgress::Instance().TaskTracker().Stop(key.origin);
- (*setter)(true);
+ (*setter)(nullptr);
return;
}
// check if content is known to remote serve service
@@ -72,7 +72,7 @@ auto CreateContentCASMap(LocalPathsPtr const& just_mr_paths,
.type = ObjectType::File}},
local_api)) {
JustMRProgress::Instance().TaskTracker().Stop(key.origin);
- (*setter)(true);
+ (*setter)(nullptr);
return;
}
}
@@ -84,7 +84,7 @@ auto CreateContentCASMap(LocalPathsPtr const& just_mr_paths,
.type = ObjectType::File}},
local_api)) {
JustMRProgress::Instance().TaskTracker().Stop(key.origin);
- (*setter)(true);
+ (*setter)(nullptr);
return;
}
// archive needs network fetching;
@@ -156,7 +156,8 @@ auto CreateContentCASMap(LocalPathsPtr const& just_mr_paths,
JustMRProgress::Instance().TaskTracker().Stop(key.origin);
}
// success!
- (*setter)(true);
+ (*setter)(nullptr);
};
- return AsyncMapConsumer<ArchiveContent, bool>(ensure_in_cas, jobs);
+ return AsyncMapConsumer<ArchiveContent, std::nullptr_t>(ensure_in_cas,
+ jobs);
}
diff --git a/src/other_tools/ops_maps/content_cas_map.hpp b/src/other_tools/ops_maps/content_cas_map.hpp
index c871c664..599c9550 100644
--- a/src/other_tools/ops_maps/content_cas_map.hpp
+++ b/src/other_tools/ops_maps/content_cas_map.hpp
@@ -62,8 +62,9 @@ struct ArchiveRepoInfo {
}
};
-/// \brief Maps the content hash of an archive to an "exists" status flag.
-using ContentCASMap = AsyncMapConsumer<ArchiveContent, bool>;
+/// \brief Maps the content hash of an archive to nullptr, as we only care if
+/// the map fails or not.
+using ContentCASMap = AsyncMapConsumer<ArchiveContent, std::nullptr_t>;
[[nodiscard]] auto CreateContentCASMap(LocalPathsPtr const& just_mr_paths,
MirrorsPtr const& additional_mirrors,