Skip to content
Snippets Groups Projects
Commit 47ec299f authored by Eesaan Atluri's avatar Eesaan Atluri
Browse files

Add time of request to the account request object.

parent 2ef47c76
No related branches found
No related tags found
6 merge requests!147Merge previous default branch feat-cod-rmq into main,!85kill nginx process running under user from login node,!51Fix acct create wait,!39WIP:Feat cod rmq,!31Feat add user reg logger,!38WIP: Feat cod rmq
......@@ -4,6 +4,7 @@ import sys
import dataset
import logging
from rc_rmq import RCRMQ
from datetime import datetime
# Define queue name
task = 'reg_logger'
......@@ -24,6 +25,7 @@ def log_registration(ch, method, properties, body):
account_req = json.loads(body)
table.insert(account_req)
account_req['req_time'] = datetime.now(),
logger.info("logged account request for %s", account_req['username'])
ch.basic_ack(delivery_tag=method.delivery_tag)
......
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