From c7ff9222b74402e068630352ba37de0f15d07b88 Mon Sep 17 00:00:00 2001 From: Frederick Muriuki Muriithi Date: Tue, 3 Dec 2024 11:18:14 -0600 Subject: 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. --- scripts/rqtl2/install_genotypes.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'scripts/rqtl2/install_genotypes.py') diff --git a/scripts/rqtl2/install_genotypes.py b/scripts/rqtl2/install_genotypes.py index 20a19da..8762655 100644 --- a/scripts/rqtl2/install_genotypes.py +++ b/scripts/rqtl2/install_genotypes.py @@ -7,6 +7,7 @@ from functools import reduce from typing import Iterator, Optional from logging import Logger, getLogger +from redis import Redis import MySQLdb as mdb from MySQLdb.cursors import DictCursor @@ -185,8 +186,10 @@ def cross_reference_genotypes( cursor.executemany(insertquery, insertparams) return cursor.rowcount -def install_genotypes(#pylint: disable=[too-many-arguments, too-many-locals] +def install_genotypes(#pylint: disable=[too-many-locals] + rconn: Redis,#pylint: disable=[unused-argument] dbconn: mdb.Connection, + fullyqualifiedjobid: str,#pylint: disable=[unused-argument] args: argparse.Namespace, logger: Logger = getLogger(__name__) ) -> int: -- cgit v1.2.3