From b7220a3aa823cf2d05cef8a948f3f85163f69416 Mon Sep 17 00:00:00 2001 From: blagoja Date: Tue, 28 May 2024 17:33:16 +0200 Subject: [PATCH] Move cloud import --- ckanext/qa/tasks.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ckanext/qa/tasks.py b/ckanext/qa/tasks.py index f067775..c7898bb 100644 --- a/ckanext/qa/tasks.py +++ b/ckanext/qa/tasks.py @@ -14,7 +14,6 @@ import ckan.lib.helpers as ckan_helpers from ckanext.qa.sniff_format import sniff_file_format from ckanext.archiver.model import Archival, Status -from google.cloud import storage import logging @@ -300,6 +299,8 @@ def score_by_sniffing_data(archival, resource, score_reasons): if cloudstorage_enabled: + from google.cloud import storage + # check if blob exists in cloudstorage path_to_json = config.get( 'ckanext.cloudstorage.google_service_account_json')