From 471fd42bf3d88f1c5da4139bf3e01fee38bc07cb Mon Sep 17 00:00:00 2001 From: Doug Latornell Date: Sun, 8 Dec 2024 14:29:21 -0800 Subject: [PATCH] Disable archive_tarball worker uploads to graham Commented out the archive_tarball worker launch for month-end processing in next_workers.py to prevent its execution. The corresponding test case in test_next_workers.py has also been commented out to prevent failures associated with the disabled worker. This was done to avoid connection attempts to graham during its 7dec24 to 3jan25 downtime. --- nowcast/next_workers.py | 16 ++++++++-------- tests/test_next_workers.py | 36 ++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/nowcast/next_workers.py b/nowcast/next_workers.py index 7e68c66d..2686c1c1 100644 --- a/nowcast/next_workers.py +++ b/nowcast/next_workers.py @@ -1517,14 +1517,14 @@ def after_download_results(msg, config, checklist): args=["day", var_group, "--run-date", run_date], ) ) - if arrow.get(run_date).shift(days=+1).day == 1: - yyyymmm = arrow.get(run_date).format("YYYY-MMM").lower() - next_workers[msg.type].append( - NextWorker( - "nowcast.workers.archive_tarball", - args=["nowcast-green", yyyymmm, "robot.graham"], - ) - ) + # if arrow.get(run_date).shift(days=+1).day == 1: + # yyyymmm = arrow.get(run_date).format("YYYY-MMM").lower() + # next_workers[msg.type].append( + # NextWorker( + # "nowcast.workers.archive_tarball", + # args=["nowcast-green", yyyymmm, "robot.graham"], + # ) + # ) return next_workers[msg.type] if run_type.startswith("forecast"): next_workers[msg.type].append( diff --git a/tests/test_next_workers.py b/tests/test_next_workers.py index e62ba773..23c0d21e 100644 --- a/tests/test_next_workers.py +++ b/tests/test_next_workers.py @@ -2138,24 +2138,24 @@ def test_success_nowcast_green_not_monthend_no_launch_archive_tarball( ) assert archive_tarball not in workers - def test_success_nowcast_green_monthend_launch_archive_tarball( - self, config, checklist - ): - workers = next_workers.after_download_results( - Message( - "download_results", - "success nowcast-green", - payload={"nowcast-green": {"run date": "2022-05-31"}}, - ), - config, - checklist, - ) - expected = NextWorker( - "nowcast.workers.archive_tarball", - args=["nowcast-green", "2022-may", "robot.graham"], - host="localhost", - ) - assert expected in workers + # def test_success_nowcast_green_monthend_launch_archive_tarball( + # self, config, checklist + # ): + # workers = next_workers.after_download_results( + # Message( + # "download_results", + # "success nowcast-green", + # payload={"nowcast-green": {"run date": "2022-05-31"}}, + # ), + # config, + # checklist, + # ) + # expected = NextWorker( + # "nowcast.workers.archive_tarball", + # args=["nowcast-green", "2022-may", "robot.graham"], + # host="localhost", + # ) + # assert expected in workers @pytest.mark.parametrize( "run_type, run_date",