From e2290aa49aa788ee330d78c13ea5876f5a44ac49 Mon Sep 17 00:00:00 2001 From: Andrey Dolgolev Date: Mon, 7 Mar 2022 19:16:59 +0200 Subject: [PATCH] Add fixes. --- backend/moonstreamapi/routes/queries.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/backend/moonstreamapi/routes/queries.py b/backend/moonstreamapi/routes/queries.py index 23f7c617..ee03e790 100644 --- a/backend/moonstreamapi/routes/queries.py +++ b/backend/moonstreamapi/routes/queries.py @@ -22,6 +22,7 @@ from ..settings import ( MOONSTREAM_CRAWLERS_SERVER_URL, MOONSTREAM_CRAWLERS_SERVER_PORT, MOONSTREAM_QUERIES_BUCKET, + MOONSTREAM_QUERIES_BUCKET_PREFIX, MOONSTREAM_QUERIES_JOURNAL_ID, ) from ..settings import bugout_client as bc @@ -346,7 +347,7 @@ async def get_access_link_handler( "get_object", Params={ "Bucket": MOONSTREAM_QUERIES_BUCKET, - "Key": f"queries/{query_id}/data.{file_type}", + "Key": f"{MOONSTREAM_QUERIES_BUCKET_PREFIX}/{query_id}/data.{file_type}", }, ExpiresIn=300000, HttpMethod="GET", @@ -367,14 +368,6 @@ async def remove_query_handler( """ token = request.state.token - """ - def delete_resource( - self, - token: Union[str, uuid.UUID], - resource_id: Union[str, uuid.UUID], - timeout: float = REQUESTS_TIMEOUT - """ - params = {"type": data.BUGOUT_RESOURCE_QUERY_RESOLVER, "name": query_name} try: resources: BugoutResources = bc.list_resources(token=token, params=params)