Skip to content

Commit

Permalink
Disable archive_tarball worker uploads to graham
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
douglatornell committed Dec 8, 2024
1 parent b1de130 commit 471fd42
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
16 changes: 8 additions & 8 deletions nowcast/next_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
36 changes: 18 additions & 18 deletions tests/test_next_workers.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit 471fd42

Please sign in to comment.