diff --git a/prod_rmq_agents/notify_user.py b/prod_rmq_agents/notify_user.py index 73570df55c38b3d4c018473da3a5aa52a96b485f..4f1dd3e47db9c07703eb1261d4ce464e35c5b1d8 100644 --- a/prod_rmq_agents/notify_user.py +++ b/prod_rmq_agents/notify_user.py @@ -14,7 +14,7 @@ task = "notify_user" args = rc_util.get_args() logger = rc_util.get_logger(args) -db = dataset.connect(f"sqlite:///.agent_db/user_reg.db") +db = dataset.connect(f"sqlite:///{rcfg.db_path}/user_reg.db") table = db["users"] # Instantiate rabbitmq object diff --git a/prod_rmq_agents/task_manager.py b/prod_rmq_agents/task_manager.py index ec868745e9fce8a65808899fbb6edd4eee3c4239..9ad0b78bcdccfc679790fc983f67d65cb517a851 100644 --- a/prod_rmq_agents/task_manager.py +++ b/prod_rmq_agents/task_manager.py @@ -17,7 +17,7 @@ timeout = 30 args = rc_util.get_args() logger = rc_util.get_logger(args) -db = dataset.connect(f"sqlite:///.agent_db/user_reg.db") +db = dataset.connect(f"sqlite:///{rcfg.db_path}/user_reg.db") table = db["users"] record = { diff --git a/prod_rmq_agents/user_reg_logger.py b/prod_rmq_agents/user_reg_logger.py index a9c878e4216ab4718b9fb579d6e194e9e8ba8e87..ea8f9eed894c93c304f7c755c3f74f69b72f7029 100755 --- a/prod_rmq_agents/user_reg_logger.py +++ b/prod_rmq_agents/user_reg_logger.py @@ -4,6 +4,7 @@ import dataset import rc_util from rc_rmq import RCRMQ from datetime import datetime +import rabbit_config as rcfg # Define queue name task = "reg_logger" @@ -18,7 +19,7 @@ args = rc_util.get_args() logger = rc_util.get_logger() # Open registry table in DB -db = dataset.connect("sqlite:///.agent_db/reg_logger.db") +db = dataset.connect(f"sqlite:///{rcfg.db_path}/reg_logger.db") account_req_table = db["registry"]