Skip to content

Commit e61fcc7

Browse files
committed
Disable hindcast archive_tarball uploads to graham
Commented out the archive_tarball worker launch for hindcast runs 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.
1 parent 5b6bd81 commit e61fcc7

File tree

2 files changed

+33
-33
lines changed

2 files changed

+33
-33
lines changed

nowcast/next_workers.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -1699,14 +1699,14 @@ def after_split_results(msg, config, checklist):
16991699
if msg.type.startswith("success"):
17001700
if config["results tarballs"]["archive hindcast"]:
17011701
last_date = max(map(arrow.get, msg.payload))
1702-
if arrow.get(last_date).shift(days=+1).day == 1:
1703-
yyyymmm = arrow.get(last_date).format("YYYY-MMM").lower()
1704-
next_workers[msg.type].append(
1705-
NextWorker(
1706-
"nowcast.workers.archive_tarball",
1707-
args=["hindcast", yyyymmm, "robot.graham"],
1708-
)
1709-
)
1702+
# if arrow.get(last_date).shift(days=+1).day == 1:
1703+
# yyyymmm = arrow.get(last_date).format("YYYY-MMM").lower()
1704+
# next_workers[msg.type].append(
1705+
# NextWorker(
1706+
# "nowcast.workers.archive_tarball",
1707+
# args=["hindcast", yyyymmm, "robot.graham"],
1708+
# )
1709+
# )
17101710
return next_workers[msg.type]
17111711

17121712

tests/test_next_workers.py

+25-25
Original file line numberDiff line numberDiff line change
@@ -2400,31 +2400,31 @@ def test_success_not_archive_hindcast_notlaunch_archive_tarball_hindcast(
24002400
)
24012401
assert archive_tarball not in workers
24022402

2403-
def test_success_archive_hindcast_monthend_launch_archive_tarball_hindcast(
2404-
self, config, checklist, monkeypatch
2405-
):
2406-
monkeypatch.setitem(config["results tarballs"], "archive hindcast", True)
2407-
workers = next_workers.after_split_results(
2408-
Message(
2409-
"split_results",
2410-
"success hindcast",
2411-
payload={
2412-
"2022-10-26",
2413-
"2022-10-27",
2414-
"2022-10-28",
2415-
"2022-10-29",
2416-
"2022-10-30",
2417-
"2022-10-31",
2418-
},
2419-
),
2420-
config,
2421-
checklist,
2422-
)
2423-
expected = NextWorker(
2424-
"nowcast.workers.archive_tarball",
2425-
args=["hindcast", "2022-oct", "robot.graham"],
2426-
)
2427-
assert workers[-1] == expected
2403+
# def test_success_archive_hindcast_monthend_launch_archive_tarball_hindcast(
2404+
# self, config, checklist, monkeypatch
2405+
# ):
2406+
# monkeypatch.setitem(config["results tarballs"], "archive hindcast", True)
2407+
# workers = next_workers.after_split_results(
2408+
# Message(
2409+
# "split_results",
2410+
# "success hindcast",
2411+
# payload={
2412+
# "2022-10-26",
2413+
# "2022-10-27",
2414+
# "2022-10-28",
2415+
# "2022-10-29",
2416+
# "2022-10-30",
2417+
# "2022-10-31",
2418+
# },
2419+
# ),
2420+
# config,
2421+
# checklist,
2422+
# )
2423+
# expected = NextWorker(
2424+
# "nowcast.workers.archive_tarball",
2425+
# args=["hindcast", "2022-oct", "robot.graham"],
2426+
# )
2427+
# assert workers[-1] == expected
24282428

24292429
def test_success_archive_hindcast_not_monthend_launch_archive_tarball_hindcast(
24302430
self, config, checklist, monkeypatch

0 commit comments

Comments
 (0)