aboutsummaryrefslogtreecommitdiff
path: root/scripts/rqtl2/entry.py
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2024-12-03 11:18:14 -0600
committerFrederick Muriuki Muriithi2024-12-03 15:11:24 -0600
commitc7ff9222b74402e068630352ba37de0f15d07b88 (patch)
tree61604f01774ff170711df27f99d00ea4a2b3461b /scripts/rqtl2/entry.py
parent0c59c583399ff0158d45c0bbdad61a056bd8fd6f (diff)
downloadgn-uploader-c7ff9222b74402e068630352ba37de0f15d07b88.tar.gz
Pass the redis connection and fully qualified job id
Pass the redis connection on to the function used to build main since it might need to use a connection to redis. Also pass the computed fully qualified job id rather than recomputing it every time. Update dependent functions to take the new arguments.
Diffstat (limited to 'scripts/rqtl2/entry.py')
-rw-r--r--scripts/rqtl2/entry.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/rqtl2/entry.py b/scripts/rqtl2/entry.py
index 48d89fb..327ed2c 100644
--- a/scripts/rqtl2/entry.py
+++ b/scripts/rqtl2/entry.py
@@ -16,7 +16,10 @@ from scripts.redis_logger import setup_redis_logger
def build_main(
args: Namespace,
- run_fn: Callable[[Connection, Namespace, logging.Logger], int],
+ run_fn: Callable[
+ [Redis, Connection, str, Namespace, logging.Logger],
+ int
+ ],
loggername: str
) -> Callable[[],int]:
"""Build a function to be used as an entry-point for scripts."""
@@ -45,7 +48,7 @@ def build_main(
logger.error("File not found: '%s'.", args.rqtl2bundle)
return 2
- returncode = run_fn(dbconn, args, logger)
+ returncode = run_fn(rconn, dbconn, fqjobid, args, logger)
if returncode == 0:
rconn.hset(fqjobid, "status", "completed:success")
return returncode