summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/other_tools/ops_maps/content_cas_map.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/other_tools/ops_maps/content_cas_map.cpp b/src/other_tools/ops_maps/content_cas_map.cpp
index 01a7f484..da37df4d 100644
--- a/src/other_tools/ops_maps/content_cas_map.cpp
+++ b/src/other_tools/ops_maps/content_cas_map.cpp
@@ -66,16 +66,6 @@ auto CreateContentCASMap(JustMR::PathsPtr const& just_mr_paths,
return;
}
JustMRProgress::Instance().TaskTracker().Start(key.origin);
- // check if content is in remote CAS, if a remote is given
- if (remote_api and local_api and remote_api->IsAvailable(digest) and
- remote_api->RetrieveToCas(
- {Artifact::ObjectInfo{.digest = digest,
- .type = ObjectType::File}},
- local_api)) {
- JustMRProgress::Instance().TaskTracker().Stop(key.origin);
- (*setter)(true);
- return;
- }
// add distfile to CAS
auto repo_distfile =
(key.distfile
@@ -88,6 +78,16 @@ auto CreateContentCASMap(JustMR::PathsPtr const& just_mr_paths,
(*setter)(true);
return;
}
+ // check if content is in remote CAS, if a remote is given
+ if (remote_api and local_api and remote_api->IsAvailable(digest) and
+ remote_api->RetrieveToCas(
+ {Artifact::ObjectInfo{.digest = digest,
+ .type = ObjectType::File}},
+ local_api)) {
+ JustMRProgress::Instance().TaskTracker().Stop(key.origin);
+ (*setter)(true);
+ return;
+ }
// archive needs fetching
// before any network fetching, check that mandatory fields are provided
if (key.fetch_url.empty()) {