From c9854b3d5436dc7e712b186fa4b9feaa6ff6a50b Mon Sep 17 00:00:00 2001 From: wraymo <37269683+wraymo@users.noreply.github.com> Date: Mon, 13 May 2024 21:29:42 -0400 Subject: [PATCH] clp-package: Fix errors and warnings in search scheduler (fixes #393). (#399) --- components/clp-py-utils/clp_py_utils/sql_adapter.py | 4 ++-- .../job_orchestration/scheduler/search/search_scheduler.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/clp-py-utils/clp_py_utils/sql_adapter.py b/components/clp-py-utils/clp_py_utils/sql_adapter.py index ef9940658..3dfd4d8e5 100644 --- a/components/clp-py-utils/clp_py_utils/sql_adapter.py +++ b/components/clp-py-utils/clp_py_utils/sql_adapter.py @@ -114,9 +114,9 @@ def create_connection(): return self.create_connection(disable_localhost_socket_connection) if "mysql" == self.database_config.type: - dialect = mysqlconnector.dialect + dialect = mysqlconnector.dialect() elif "mariadb" == self.database_config.type: - dialect = mariadbconnector.dialect + dialect = mariadbconnector.dialect() else: raise NotImplementedError return ConnectionPoolWrapper( diff --git a/components/job-orchestration/job_orchestration/scheduler/search/search_scheduler.py b/components/job-orchestration/job_orchestration/scheduler/search/search_scheduler.py index af916c2dd..50ae2d3b0 100644 --- a/components/job-orchestration/job_orchestration/scheduler/search/search_scheduler.py +++ b/components/job-orchestration/job_orchestration/scheduler/search/search_scheduler.py @@ -492,7 +492,7 @@ async def handle_jobs( db_conn_pool, results_cache_uri, num_archives_to_search_per_sub_job ) if 0 == len(reducer_acquisition_tasks): - tasks.append(asyncio.sleep(jobs_poll_delay)) + tasks.append(asyncio.create_task(asyncio.sleep(jobs_poll_delay))) else: tasks.extend(reducer_acquisition_tasks)