Skip to content

Commit a0c5bf5

Browse files
committed
fix(history): cap default backfill window at 30 days (mila sacct limit)
1 parent f39d9e1 commit a0c5bf5

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

cluv/__main__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -206,8 +206,8 @@ def add_history_args(subparsers: Subparsers) -> argparse.ArgumentParser:
206206
history_parser.add_argument(
207207
"--since-days",
208208
type=int,
209-
default=60,
210-
help="How many days of sacct to pull for `backfill`. Default: 60.",
209+
default=30,
210+
help="How many days of sacct to pull for `backfill`. Default: 30.",
211211
)
212212
history_parser.set_defaults(func=history)
213213
return history_parser

cluv/history.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ def _records_from_sacct(output: str, cluster: str) -> list[JobRecord]:
191191

192192

193193
async def backfill_from_sacct(
194-
remote: Remote, cluster: str, *, since_days: int = 60
194+
remote: Remote, cluster: str, *, since_days: int = 30
195195
) -> int:
196196
"""Pull recent cluv-stamped jobs from sacct on ``cluster``, write to cache.
197197
@@ -271,5 +271,5 @@ def clear(cluster: str | None = None, key: str | None = None) -> int:
271271

272272

273273
# Convenience for sync callers (CLI subcommands) that don't want to await.
274-
def backfill_sync(remote: Remote, cluster: str, *, since_days: int = 60) -> int:
274+
def backfill_sync(remote: Remote, cluster: str, *, since_days: int = 30) -> int:
275275
return asyncio.run(backfill_from_sacct(remote, cluster, since_days=since_days))

0 commit comments

Comments
 (0)