From b9f05bdb1fbec0345e80f1eb6bf075f3a26b02e0 Mon Sep 17 00:00:00 2001 From: boneyard93501 <4523011+boneyard93501@users.noreply.github.com> Date: Mon, 24 Apr 2023 14:25:48 -0500 Subject: [PATCH] add peer ids to return --- marine-examples/url-downloader/src/aqua/main.aqua | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/marine-examples/url-downloader/src/aqua/main.aqua b/marine-examples/url-downloader/src/aqua/main.aqua index a98bd31..d62d38b 100644 --- a/marine-examples/url-downloader/src/aqua/main.aqua +++ b/marine-examples/url-downloader/src/aqua/main.aqua @@ -23,18 +23,21 @@ func put(file_name: string, file_content: []u8) -> PutResult, string, string: res <- UrlDownloader.put(file_name, file_content) <- res, w.metadata.peer_id, w.metadata.relay_id! -func get_without_ids(file_name: string) -> []u8: +func get_without_ids(file_name: string) -> []u8, []string: result: *[]u8 + peers: *string workers <- getWorkers() for w <- workers par: on w.metadata.peer_id via w.metadata.relay_id: res <- UrlDownloader.get(file_name) if res.stderr == "": result <<- res.stdout + peers <<- w.metadata.peer_id + peers <<- w.metadata.relay_id! -- result <<- res.stdout join result[workers.length - 1] par Peer.timeout(10000, "Finding file timed out.") - <- result! + <- result!, peers func get_with_ids(file_name: string, peer_id: string, relay_id: string) -> GetResult: on peer_id via relay_id: