aboutsummaryrefslogtreecommitdiff
path: root/scripts/rqtl2
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-01-23 12:33:08 +0300
committerFrederick Muriuki Muriithi2024-01-23 12:33:08 +0300
commit7976230ffcb1de4f744895ee252298dea9a15f4c (patch)
tree93767bf918847c7707cf369c6f3fbc1b2a562590 /scripts/rqtl2
parent1822e893586e13334cc66d59efbe03c1ffb48b66 (diff)
downloadgn-uploader-7976230ffcb1de4f744895ee252298dea9a15f4c.tar.gz
Update scripts to use redis prefix.
Diffstat (limited to 'scripts/rqtl2')
-rw-r--r--scripts/rqtl2/entry.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/rqtl2/entry.py b/scripts/rqtl2/entry.py
index eccc19d..93fc130 100644
--- a/scripts/rqtl2/entry.py
+++ b/scripts/rqtl2/entry.py
@@ -6,6 +6,7 @@ from argparse import Namespace
from redis import Redis
from MySQLdb import Connection
+from qc_app import jobs
from qc_app.db_utils import database_connection
from qc_app.check_connections import check_db, check_redis
@@ -25,10 +26,11 @@ def build_main(args: Namespace,
with (Redis.from_url(args.redisuri, decode_responses=True) as rconn,
database_connection(args.databaseuri) as dbconn):
+ fqjobid = jobs.job_key(jobs.jobsnamespace(), args.jobid)
logger.addHandler(setup_redis_logger(
rconn,
- args.jobid,
- f"{str(args.jobid)}:log-messages",
+ fqjobid,
+ f"{fqjobid}:log-messages",
args.redisexpiry))
logger.setLevel(loglevel)
return run_fn(dbconn, args)