From 44e3c21ba89aa19c066148fdd18745f45e168d50 Mon Sep 17 00:00:00 2001 From: Peter Amstutz Date: Wed, 8 Jul 2020 10:28:28 -0400 Subject: Fetch status as anonymous user Arvados-DCO-1.1-Signed-off-by: Peter Amstutz --- bh20simplewebuploader/main.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/bh20simplewebuploader/main.py b/bh20simplewebuploader/main.py index 1c96d36..d602288 100644 --- a/bh20simplewebuploader/main.py +++ b/bh20simplewebuploader/main.py @@ -17,6 +17,10 @@ import io import arvados from markupsafe import Markup +ARVADOS_API = 'lugli.arvadosapi.com' +ANONYMOUS_TOKEN = '5o42qdxpxp5cj15jqjf7vnxx5xduhm4ret703suuoa3ivfglfh' +UPLOADER_PROJECT = 'lugli-j7d0g-n5clictpuvwk8aa' + logging.basicConfig(level=logging.DEBUG) log = logging.getLogger(__name__ ) log.debug("Entering web uploader") @@ -459,9 +463,8 @@ def status_page(): Processing status """ - api = arvados.api() - uploader_project = 'lugli-j7d0g-n5clictpuvwk8aa' - pending = arvados.util.list_all(api.collections().list, filters=[["owner_uuid", "=", uploader_project]]) + api = arvados.api(host=ARVADOS_API, token=ANONYMOUS_TOKEN) + pending = arvados.util.list_all(api.collections().list, filters=[["owner_uuid", "=", UPLOADER_PROJECT]]) out = [] status = {} for p in pending: -- cgit v1.2.3