From 5d562cac0ab36e2bd21d1f0e56be57ebd7dab5b1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Roberto=20Garc=C3=ADa?= Date: Wed, 4 Oct 2023 10:27:12 +0300 Subject: [PATCH] Cast ENV maxJobs to int to compute max_jobs_to_take (#84) --- operator_engine/operator_main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/operator_engine/operator_main.py b/operator_engine/operator_main.py index 78b1abc..eb80a08 100644 --- a/operator_engine/operator_main.py +++ b/operator_engine/operator_main.py @@ -225,7 +225,7 @@ def run_events_monitor(): "storageExpiry": OperatorConfig.ENVIROMENT_storageExpiry, "maxJobDuration": OperatorConfig.ENVIROMENT_maxJobDuration, } - max_jobs_to_take = OperatorConfig.ENVIROMENT_maxJobs - current_jobs + max_jobs_to_take = int(OperatorConfig.ENVIROMENT_maxJobs) - current_jobs jobs = announce_and_get_sql_pending_jobs(logger, announce, max_jobs_to_take) for job in jobs: logger.info(f"Starting handler for job {job}")