From 068c72d4950d1af0ba9dcf09d60c344d1284bd37 Mon Sep 17 00:00:00 2001 From: Luiz Irber Date: Sun, 17 Nov 2024 19:21:56 +0000 Subject: [PATCH] Fix: redirect to farm (#74) The IPFS seeder went away, default to redirect to farm.cse.ucdavis.edu for now --- wort/blueprints/viewer/views.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/wort/blueprints/viewer/views.py b/wort/blueprints/viewer/views.py index 194245b..3d9c6b7 100644 --- a/wort/blueprints/viewer/views.py +++ b/wort/blueprints/viewer/views.py @@ -42,13 +42,15 @@ def view(public_db, dataset_id): if dataset is not None: # Found a hit in DB - if dataset.ipfs is not None and public_db == "genomes": - return redirect(f"https://cloudflare-ipfs.com/ipfs/{dataset.ipfs}") - else: - # SRA/IMG IPFS links are unreliable, default to s3 - return view_s3(public_db, dataset_id) + #if dataset.ipfs is not None and public_db == "genomes": + # return redirect(f"https://cloudflare-ipfs.com/ipfs/{dataset.ipfs}") + #else: + # # could do this if egress charges were not so high... + # return view_s3(public_db, dataset_id) + return redirect(f"https://farm.cse.ucdavis.edu/~irber/wort-{public_db}/sigs/{dataset_id}.sig") else: # Found in cache, redirect - return redirect(f"https://cloudflare-ipfs.com/ipfs/{dataset_info['ipfs']}") + #return redirect(f"https://cloudflare-ipfs.com/ipfs/{dataset_info['ipfs']}") + return redirect(f"https://farm.cse.ucdavis.edu/~irber/wort-{public_db}/sigs/{dataset_id}.sig") return "Dataset not found", 404