diff options
| author | Per Larsson <[email protected]> | 2021-09-21 16:27:01 +0200 |
|---|---|---|
| committer | Per Larsson <[email protected]> | 2021-09-21 16:27:01 +0200 |
| commit | 1630b31fa2752fcaf63edb0aaea04ff85f70ba15 (patch) | |
| tree | 0a5f739a342200d97e7361298cae27cc6c176de1 /zenserver/compute/apply.cpp | |
| parent | Refactored get/set cache pyload. (diff) | |
| parent | Update README.md (diff) | |
| download | zen-1630b31fa2752fcaf63edb0aaea04ff85f70ba15.tar.xz zen-1630b31fa2752fcaf63edb0aaea04ff85f70ba15.zip | |
Merge branch 'main' of https://github.com/EpicGames/zen
Diffstat (limited to 'zenserver/compute/apply.cpp')
| -rw-r--r-- | zenserver/compute/apply.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/zenserver/compute/apply.cpp b/zenserver/compute/apply.cpp index 3197eaee4..15d9e0141 100644 --- a/zenserver/compute/apply.cpp +++ b/zenserver/compute/apply.cpp @@ -375,7 +375,7 @@ HttpFunctionService::HttpFunctionService(CasStore& Store, CidStore& InCidStore, FunctionSpec.IterateAttachments([&](CbFieldView Field) { const IoHash Hash = Field.AsHash(); - ChunkSet.AddChunk(Hash); + ChunkSet.AddChunkToSet(Hash); }); // Note that we store executables uncompressed to make it @@ -399,16 +399,15 @@ HttpFunctionService::HttpFunctionService(CasStore& Store, CidStore& InCidStore, CbObjectWriter ResponseWriter; ResponseWriter.BeginArray("need"); - for (const IoHash& Hash : ChunkSet.GetChunkSet()) - { + ChunkSet.IterateChunks([&](const IoHash& Hash) { ZEN_DEBUG("worker {}: need chunk {}", WorkerId, Hash); ResponseWriter.AddHash(Hash); - } + }); ResponseWriter.EndArray(); - ZEN_DEBUG("worker {}: need {} attachments", WorkerId, ChunkSet.GetChunkSet().size()); + ZEN_DEBUG("worker {}: need {} attachments", WorkerId, ChunkSet.GetSize()); return HttpReq.WriteResponse(HttpResponseCode::NotFound, ResponseWriter.Save()); } |