From eb1ada2f570314c4b6387df5248cf3c9a318c14e Mon Sep 17 00:00:00 2001 From: Roy de Goei <goei@astron.nl> Date: Tue, 28 Jan 2025 15:46:29 +0100 Subject: [PATCH] SDC-1647: Undo because atdb can not handle service filter for juelich --- atdb/taskdatabase/services/algorithms.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index e5293d66..abcf447f 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -664,25 +664,29 @@ def add_plots(task, results, expand_image=False): plot_files = [] # translate the path to a url for the original plots location + # the next four call shoulod use filter=task.service_filter BUT since juelich is no working + # the service_filter is incorrect and we can only use srm.grid.sara.nl + default_filter = "srm.grid.sara.nl" + try: - srm_to_url = Configuration.objects.get(filter=task.service_filter, key='dcache:srm_to_url').value + srm_to_url = Configuration.objects.get(filter=default_filter, key='dcache:srm_to_url').value except: srm_to_url = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/ldv/::https://webdav.grid.surfsara.nl/" # translate the path to a url for when the plots are moved by the archiver try: - srm_to_url_archive_disk = Configuration.objects.get(filter=task.service_filter, key='dcache:srm_to_url_archive_disk').value + srm_to_url_archive_disk = Configuration.objects.get(filter=default_filter, key='dcache:srm_to_url_archive_disk').value except: srm_to_url_archive_disk = "srm://srm.grid.sara.nl/pnfs/grid.sara.nl/data/lofar/ops/disk/projects/::https://webdav.grid.surfsara.nl/projects/" # retrieve the current tokens for both the original and archived locations try: - token_original = str(Configuration.objects.get(filter=task.service_filter, key='token:macaroon_disk_ldv').value) + token_original = str(Configuration.objects.get(filter=default_filter, key='token:macaroon_disk_ldv').value) except: token_original = '' try: - token_archive_disk = str(Configuration.objects.get(filter=task.service_filter, key='token:macaroon_disk_project').value) + token_archive_disk = str(Configuration.objects.get(filter=default_filter, key='token:macaroon_disk_project').value) except: token_archive_disk = '' -- GitLab