Skip to content

Commit 666f546

Browse files
docs(jobs): state what stale_timeout=0 still cleans up
Review follow-up: the stale_timeout entry still said 0 skips the cleanup, but the success and error records of keys that have left both key_source and the target are now removed whatever the timeout. The test for records of existing rows covers a fresh record only, and its docstring now says so. (cherry picked from commit 6a1e171)
1 parent 7da6d5b commit 666f546

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

‎src/datajoint/jobs.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,9 @@ def refresh(
340340
stale_timeout : float, optional
341341
Seconds after which jobs are checked for staleness.
342342
Jobs older than this are removed if key not in key_source.
343-
Default from ``config.jobs.stale_timeout``. Set to 0 to skip.
343+
Default from ``config.jobs.stale_timeout``. Set to 0 to skip the
344+
age-based check; the cleanup of success and error records whose
345+
keys have left both key_source and the target runs regardless.
344346
orphan_timeout : float, optional
345347
Seconds after which reserved jobs are considered orphaned.
346348
Reserved jobs older than this are deleted and re-added as pending.

‎tests/integration/test_jobs_refresh.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def test_refresh_removes_records_of_vanished_keys(pipeline):
131131

132132

133133
def test_refresh_keeps_success_records_of_existing_rows(schema_by_backend):
134-
"""A success record stays while its row exists, even if its key leaves key_source."""
134+
"""A fresh success record stays while its row exists, even if its key leaves key_source."""
135135

136136
@schema_by_backend
137137
class Raw(dj.Manual):

0 commit comments

Comments
 (0)