diff --git a/main.py b/main.py index 03cad9c152fe63e7a099a33b3a919b8cc1e81506..0a1c5b958be051fed080714798447f25de9c5e12 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, diff --git a/workers/doc-enricher.py b/workers/doc-enricher.py index 4dc10c2410945975273c8577ea455c297d6d474e..92533949d05e02a793c48a13f0303f52ee4549a5 100644 --- a/workers/doc-enricher.py +++ b/workers/doc-enricher.py @@ -253,7 +253,7 @@ def enrich_docs( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -290,7 +290,7 @@ def enrich_docs( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) diff --git a/workers/doc-indexer.py b/workers/doc-indexer.py index 7eb62f75a936ddabeda936c9ffd0840a7b1db607..74e400383a3382379273bdbb2b2f824e63f26639 100644 --- a/workers/doc-indexer.py +++ b/workers/doc-indexer.py @@ -136,7 +136,7 @@ def index_docs(channel, method, properties, body): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -208,7 +208,7 @@ def index_docs(channel, method, properties, body): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) diff --git a/workers/doc-processor.py b/workers/doc-processor.py index feabcc07785b7dcb4a05518a4df3741b0440ffb4..8089db0baf280e5570481da795bffb29fe59e358 100644 --- a/workers/doc-processor.py +++ b/workers/doc-processor.py @@ -125,7 +125,7 @@ def process_docs( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -166,7 +166,7 @@ def process_docs( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) diff --git a/workers/metadata-processor.py b/workers/metadata-processor.py index c4c4fd06d5f92155bf1331b169d08bef3cf83783..e9c39fcc699dfcada2777ed3d07b8b28a792c223 100644 --- a/workers/metadata-processor.py +++ b/workers/metadata-processor.py @@ -318,7 +318,7 @@ def callback( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -390,7 +390,7 @@ def callback( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -438,7 +438,7 @@ def callback( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -459,7 +459,7 @@ def callback( channel, method, properties, body ): info='no info' ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) diff --git a/workers/reindexer.py b/workers/reindexer.py index 8537a248e089d500f3136aefbda0d49da64d4150..e930efd0a93a241e11fc6214f80f87a26babbebc 100644 --- a/workers/reindexer.py +++ b/workers/reindexer.py @@ -54,7 +54,7 @@ def create_sampling_task(cfg, channel, uuid): info=uuid ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) diff --git a/workers/sample-generator.py b/workers/sample-generator.py index aa90585f61eca10b8ee12b78485ac8cf37638325..70d1c038d882044a3cb51869ccfa5e98f54dd9a5 100644 --- a/workers/sample-generator.py +++ b/workers/sample-generator.py @@ -191,7 +191,7 @@ def callback(channel, method, properties, body): info=uuid ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body) @@ -241,7 +241,7 @@ def callback(channel, method, properties, body): info=uuid ) - json_body = json.dumps(log_message) + json_body = json.dumps(log_message.__dict__) print(" [x] json body : ", json_body)