From 16b7d2e2fccaa2ee3b2553cf417cc6ba54b8a287 Mon Sep 17 00:00:00 2001 From: stojanovskis1 Date: Tue, 23 Jul 2024 11:55:53 +0200 Subject: [PATCH] Add logs --- ckanext/bulkupload/views.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/ckanext/bulkupload/views.py b/ckanext/bulkupload/views.py index 3cf6c4a..f68c458 100644 --- a/ckanext/bulkupload/views.py +++ b/ckanext/bulkupload/views.py @@ -29,6 +29,8 @@ bulkupload = Blueprint("bulkupload", __name__) try: storage_path = config.get('ckan.storage_path') + log.info("12333333333333333333333") + log.info(storage_path) except: log.critical('''Please specify a ckan.storage_path in your config for your uploads''') @@ -182,12 +184,19 @@ def bulk_resource_upload(pkg_name): x = tk.get_action("resource_create")(context, data_dict) unique_filename = str(uuid.uuid4())[:8] + str(f.filename) file_name = os.path.join(storage_path, unique_filename) + log.info("FILE NAMEEEEEEEEEEEEEEEEEEEEEEEEEEEE") + log.info(file_name) f.save(file_name) object_name = '/resources/' + x['id'] + '/' + url_striped + log.info("=========================") + log.info(object_name) try: response = s3_client.upload_file(file_name, bucket, object_name) + log.info("RESPONSE!!!!!!!!!!") + log.info(response) + except ClientError as e: logging.error(e)