From bbad82dcfc8b6948ef97e02f5e315abca0666749 Mon Sep 17 00:00:00 2001 From: ddamiron <ddamiron@sii.fr> Date: Fri, 28 Jun 2019 15:35:24 +0200 Subject: [PATCH] hotfix json.dump(log_message) --- main.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 0a1c5b9..03cad9c 100644 --- a/main.py +++ b/main.py @@ -233,12 +233,12 @@ def get_metadata_records_processor(the_rabbit, the_uuid = record['geonet:info']['uuid'] - # if is_locked(the_cfg['session']['working_directory'], the_uuid ): - # logging.info("Dataset with uuid = %s is already being indexed: skipping." % the_uuid) - # continue - # else: - # logging.info("Setting lock for dataset with uuid = %s" % the_uuid) - # lock(the_cfg['session']['working_directory'], the_uuid) + if is_locked(the_cfg['session']['working_directory'], the_uuid ): + logging.info("Dataset with uuid = %s is already being indexed: skipping." % the_uuid) + continue + else: + logging.info("Setting lock for dataset with uuid = %s" % the_uuid) + lock(the_cfg['session']['working_directory'], the_uuid) # delete_dataset_from_indices(cfg, record['geonet:info']['uuid']) delete_dataset_from_dest_index(the_rabbit=the_rabbit, -- GitLab