From 6f220fd76d191e446edb114ba53e16928b3c26fb Mon Sep 17 00:00:00 2001 From: Ori Hoch Date: Thu, 18 Jan 2024 17:37:04 +0200 Subject: [PATCH] prevent locking during background material titles pipeline --- .../committees/background_material_titles.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/airflow/knesset_data_pipelines/committees/background_material_titles.py b/airflow/knesset_data_pipelines/committees/background_material_titles.py index d9c9641..dad94a4 100644 --- a/airflow/knesset_data_pipelines/committees/background_material_titles.py +++ b/airflow/knesset_data_pipelines/committees/background_material_titles.py @@ -13,7 +13,7 @@ def iterate_new_titles(): committees = get_committees_tree() with db.get_db_engine().connect() as conn: - for row in conn.execute(dedent(''' + for row in list(conn.execute(dedent(''' select sess."CommitteeSessionID" committee_session_id, sess."CommitteeID" committee_id, @@ -26,7 +26,7 @@ def iterate_new_titles(): doc."GroupTypeID" = 87 and doc."FilePath" is not null group by sess."CommitteeSessionID", sess."CommitteeID", sess."SessionUrl" - ''')): + '''))): committee = committees.get(row.committee_id) if not committee: continue