Skip to content

Commit a5ba065

Browse files
committed
Issue #1219 Mark some more cleaner related locations/files to remove
refs: #632 #863 #1123 #1165 #1219
1 parent 31241bc commit a5ba065

File tree

7 files changed

+13
-7
lines changed

7 files changed

+13
-7
lines changed

openeogeotrellis/backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3279,7 +3279,7 @@ def delete_jobs_before(
32793279
include_done: bool = True,
32803280
user_limit: Optional[int] = 1000,
32813281
) -> None:
3282-
# TODO #632 #863 #1123 #1165 remove this dead code path?
3282+
# TODO #632 #863 #1123 #1165 #1219 remove this dead code path
32833283
with self._double_job_registry as registry, TimingLogger(
32843284
title=f"Collecting jobs to delete: {upper=} {user_ids=} {include_ongoing=} {include_done=}",
32853285
logger=logger,

openeogeotrellis/cleaner.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# TODO #1219 remove this now-defunct cleaner workflow
2+
13
import argparse
24
import logging
35
from datetime import datetime, timedelta
@@ -28,7 +30,7 @@ def remove_batch_jobs_before(
2830
include_done: bool = True,
2931
user_limit: Optional[int] = 1000,
3032
) -> None:
31-
# TODO #632 #863 #1123 #1165 remove this dead code path?
33+
# TODO #632 #863 #1123 #1165 #1219 remove this dead code path
3234
with TimingLogger(title=f"Removing batch jobs before {upper}", logger=_log):
3335
# TODO: how to cope with unneeded arguments?
3436
batch_jobs = GpsBatchJobs(

openeogeotrellis/job_registry.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,7 @@ def get_all_jobs_before(
314314
per_user_limit: Optional[int] = 1000,
315315
field_whitelist: Optional[List[str]] = None,
316316
) -> List[Dict]:
317+
# TODO #632 #863 #1123 #1165 #1219 remove this dead code path
317318
def get_jobs_in(
318319
get_path: Callable[[Union[str, None], Union[str, None]], str],
319320
user_ids: Optional[List[str]] = None,
@@ -1001,7 +1002,7 @@ def get_all_jobs_before(
10011002
include_done: bool = True,
10021003
user_limit: Optional[int] = 1000,
10031004
) -> List[dict]:
1004-
# TODO #632 #863 #1123 #1165 remove this dead code path?
1005+
# TODO #632 #863 #1123 #1165 #1219 remove this dead code path
10051006
if not self.zk_job_registry:
10061007
raise NotImplementedError("only necessary for ZK cleaner script")
10071008

openeogeotrellis/zktool.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
These are just ad-hoc, short-term stop-gap measures to implement some quick wins
44
trying to fight the ZooKeeper load issue.
55
6-
TODO #236/#498/#632 remove when not necessary anymore (ZkJobRegistry is gone).
6+
TODO #632 #863 #1123 #1165 #1219 remove this dead code
77
88
99
Usage instructions:
@@ -54,6 +54,7 @@ def stats(zk_job_registry: ZkJobRegistry):
5454
"""
5555
Collect ZkJobRegistry stats: count users and jobs under "ongoing" and "done" paths.
5656
"""
57+
# TODO #632 #863 #1123 #1165 remove this dead code?
5758
with StatsReporter(report=_log.info) as stats, zk_job_registry:
5859
for mode, path_builder in [
5960
("ongoing", zk_job_registry._ongoing),
@@ -82,7 +83,7 @@ def prune(
8283
include_done: bool = True,
8384
include_ongoing: bool = False,
8485
):
85-
# TODO #632 #863 #1123 #1165 remove this dead code path?
86+
# TODO #632 #863 #1123 #1165 #1219 remove this dead code?
8687
with StatsReporter(report=_log.info) as stats, zk_job_registry:
8788
with TimingLogger(title="Collect jobs", logger=_log):
8889
jobs = zk_job_registry.get_all_jobs_before(

scripts/cleaner-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#!/usr/bin/env bash
2-
# TODO #632 #863 #1123 #1165 remove this dead code path?
2+
# TODO #632 #863 #1123 #1165 #1219 remove this now-defunct cleaner workflow
33

44
set -eo pipefail
55

scripts/kleaner-entrypoint.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
# Nightly cleaner script for deployments in k8s.
44

5+
# TODO #632 #863 #1123 #1165 #1219 remove this now-defunct cleaner workflow
6+
57
set -eo pipefail
68

79
fail_if_not_set () {

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
"scripts/submit_batch_job_log4j.properties",
5353
"scripts/submit_batch_job_log4j2.xml",
5454
"scripts/batch_job_log4j2.xml",
55-
"scripts/cleaner-entrypoint.sh", # TODO #632 #863 #1123 #1165 remove this dead code path?
55+
"scripts/cleaner-entrypoint.sh", # TODO #632 #863 #1123 #1165 #1219 remove this now-defunct cleaner workflow
5656
"scripts/job_tracker-entrypoint.sh",
5757
"scripts/async_task-entrypoint.sh",
5858
"scripts/async_task_log4j2.xml",

0 commit comments

Comments
 (0)