diff --git a/main.py b/main.py index f60ffe02330b9a8747efa94744a819ee7b8d3197..096edf5b355aaebf546aecd4369740df267efe9e 100644 --- a/main.py +++ b/main.py @@ -186,7 +186,8 @@ def delete_dataset_from_dest_index(the_rabbit, the_cfg, the_uuid): status='delete_dataset_from_dest_index', uuid_prefix='meta', info='no info', - loglevel='INFO' + loglevel='INFO', + progress_ratio=0.2 ) the_rabbit.publish_log(log_message=log_message.__dict__) # ------------------------------------------------------------ @@ -279,7 +280,8 @@ def main(cfg): status='Starting...', uuid_prefix='meta', info='no info', - loglevel='INFO' + loglevel='INFO', + progress_ratio=0 ) cfg['session']['current_uuid'] = uuid_to_get with RabbitSession(cfg) as rabbit: @@ -302,7 +304,8 @@ def main(cfg): status='Terminated', uuid_prefix='meta', info='no info', - loglevel='INFO' + loglevel='INFO', + progress_ratio=1 ) cfg['session']['current_uuid'] = uuid_to_get rabbit.publish_log(log_message=log_message2.__dict__) @@ -315,7 +318,8 @@ def main(cfg): status='this message is for testing only', uuid_prefix='meta', info='no info', - loglevel='ERROR' + loglevel='ERROR', + progress_ratio=None ) cfg['session']['current_uuid'] = uuid_to_get rabbit.publish_log(log_message=log_message2.__dict__) diff --git a/workers/doc-processor.py b/workers/doc-processor.py index b1b9f3d4724b96b3ce52713f428d5043e1cc7961..d1e952742c8ff015591a2440ef09abb53514b894 100644 --- a/workers/doc-processor.py +++ b/workers/doc-processor.py @@ -181,7 +181,7 @@ def process_docs( channel, method, properties, body ): properties=pika.BasicProperties(delivery_mode=2) ) # ------------------------------------------------------------ - channel.basic_ack(delivery_tag = method.delivery_tag) + channel.basic_ack(delivery_tag=method.delivery_tag) return diff --git a/workers/metadata-processor.py b/workers/metadata-processor.py index 03cc81f99e10feb6b795636c9e42c619048a4207..a83a40c9ec512e23aeb5bd31fd6b8e1e63bdd31e 100644 --- a/workers/metadata-processor.py +++ b/workers/metadata-processor.py @@ -441,7 +441,7 @@ def callback( channel, method, properties, body ): uuid_prefix='meta', info='no info', loglevel='INFO', - progress_ratio=50 + progress_ratio=0.5 ) json_body = json.dumps(log_message.__dict__) diff --git a/workers/reindexer.py b/workers/reindexer.py index a2681e210f5055bf7e020eb5ccab999695c28845..69d83e3e117d84691b91765dd4a056819a1d0925 100644 --- a/workers/reindexer.py +++ b/workers/reindexer.py @@ -41,7 +41,8 @@ def create_sampling_task(cfg, channel, uuid): status='create sampling task', uuid_prefix='full', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=0.2 ) json_body = json.dumps(log_message.__dict__) @@ -160,7 +161,8 @@ def on_msg_callback(channel, method, properties, body): status=message, uuid_prefix='full', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=0.3 ) json_body = json.dumps(log_message.__dict__) @@ -191,7 +193,8 @@ def on_msg_callback(channel, method, properties, body): status=message, uuid_prefix='full', info=uuid, - loglevel='ERROR' + loglevel='ERROR', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -230,7 +233,8 @@ def on_msg_callback(channel, method, properties, body): status=exc, uuid_prefix='full', info=uuid, - loglevel='ERROR' + loglevel='ERROR', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -302,7 +306,8 @@ def on_msg_callback(channel, method, properties, body): status=message, uuid_prefix='full', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -329,7 +334,8 @@ def on_msg_callback(channel, method, properties, body): status=message, uuid_prefix='meta', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=1 ) json_body = json.dumps(log_message.__dict__) @@ -360,7 +366,8 @@ def on_msg_callback(channel, method, properties, body): status=message, uuid_prefix='', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=1 ) json_body = json.dumps(log_message.__dict__) diff --git a/workers/sample-generator.py b/workers/sample-generator.py index 34d086b1035f92d3cb2a878ee7796d6d1ecb4256..07810a172f46d481d714cc74a43bfd1745827fa8 100644 --- a/workers/sample-generator.py +++ b/workers/sample-generator.py @@ -189,7 +189,8 @@ def callback(channel, method, properties, body): status=message, uuid_prefix='', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -222,7 +223,8 @@ def callback(channel, method, properties, body): status=exc, uuid_prefix='full', info=uuid, - loglevel='ERROR' + loglevel='ERROR', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -262,7 +264,8 @@ def callback(channel, method, properties, body): status=message, uuid_prefix='', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -298,7 +301,8 @@ def callback(channel, method, properties, body): status=rep, uuid_prefix='full', info=uuid, - loglevel='ERROR' + loglevel='ERROR', + progress_ratio=None ) json_body = json.dumps(log_message.__dict__) @@ -325,7 +329,8 @@ def callback(channel, method, properties, body): status=message, uuid_prefix='', info=uuid, - loglevel='INFO' + loglevel='INFO', + progress_ratio=1 ) json_body = json.dumps(log_message.__dict__)