diff --git a/prod_rmq_agents/user_reg_logger.py b/prod_rmq_agents/user_reg_logger.py index dfe8d612b280cd9aa994e1be0f8b3e314a359259..19997096e1ab82650146d09fadacf0c62328e5f3 100755 --- a/prod_rmq_agents/user_reg_logger.py +++ b/prod_rmq_agents/user_reg_logger.py @@ -19,14 +19,14 @@ args = rc_util.get_args() logger = rc_util.get_logger() # Open registry table in DB -db = dataset.connect("sqlite:///reg_logger.db") +db = dataset.connect("sqlite:///.agent_db/reg_logger.db") account_req_table = db["registry"] # Define registration logger callback def log_registration(ch, method, properties, body): account_req = json.loads(body) - account_req["req_time"] = (datetime.now(),) + account_req["req_time"] = datetime.now() account_req_table.insert(account_req) logger.info("logged account request for %s", account_req["username"]) @@ -37,5 +37,5 @@ logger.info("Start listening to queue: {}".format(task)) # Start consuming messages from queue with callback function rc_rmq.start_consume( - {"queue": task, "routing_key": "create.*", "cb": log_registration} + {"queue": task, "routing_key": "request.*", "cb": log_registration} )