Skip to content
Snippets Groups Projects
Commit 670d9115 authored by ddamiron's avatar ddamiron
Browse files

add progress_ratio tag in log_message

parent 4d8be09a
No related branches found
No related tags found
No related merge requests found
......@@ -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__)
......
......@@ -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
......
......@@ -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__)
......
......@@ -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__)
......
......@@ -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__)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment