Skip to content
Snippets Groups Projects
Commit a8d20e68 authored by Bo-Chun Chen's avatar Bo-Chun Chen
Browse files

Update database every time receive msg

parent a4bafbc3
No related branches found
No related tags found
5 merge requests!147Merge previous default branch feat-cod-rmq into main,!85kill nginx process running under user from login node,!78Feat cod rmq,!62Feat notify user errmsg,!63Feat db handle
......@@ -133,6 +133,12 @@ def task_manager(ch, method, properties, body):
current['last_update'] = datetime.now()
# Update Database
update_db(username, {
task_name: success,
'last_update': current['last_update']}
)
# Save error message if the task was failed
if not success:
errmsg = msg.get('errmsg', '')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment