fix: a never-checked source still reports no next check while its first backfill is armed
CI and images / lint (push) Successful in 2s
CI and images / extension-version (push) Successful in 2s
CI and images / frontend-build (push) Successful in 22s
CI and images / backend-lint-and-test (push) Successful in 32s
CI and images / integration (push) Successful in 2m22s
CI and images / sign-extension (push) Successful in 3s
CI and images / build-agent (push) Successful in 5s
CI and images / build-web (push) Successful in 1m51s
CI and images / smoke-web (push) Successful in 54s
CI and images / promote (push) Successful in 2s
CI and images / lint (push) Successful in 2s
CI and images / extension-version (push) Successful in 2s
CI and images / frontend-build (push) Successful in 22s
CI and images / backend-lint-and-test (push) Successful in 32s
CI and images / integration (push) Successful in 2m22s
CI and images / sign-extension (push) Successful in 3s
CI and images / build-agent (push) Successful in 5s
CI and images / build-web (push) Successful in 1m51s
CI and images / smoke-web (push) Successful in 54s
CI and images / promote (push) Successful in 2s
Every new source is created with a backfill armed, so e5bdcd2's backfill branch in compute_next_check_at answered "now" for sources that have never been checked, where the contract (test_create_response_includes_fc3d_fields) is None. The never-checked case comes first again. Scheduling is unaffected: select_due_sources already treats never-checked sources as due. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LVjrnpQjRgHdvq95rASoiR
This commit is contained in:
@@ -194,10 +194,10 @@ def compute_next_check_at(
|
||||
source: Source, artist: Artist, settings: ImportSettings,
|
||||
) -> datetime | None:
|
||||
"""Return the projected datetime of the next check, or None if never checked."""
|
||||
if backfill_ready(source):
|
||||
return datetime.now(UTC)
|
||||
if source.last_checked_at is None:
|
||||
return None
|
||||
if backfill_ready(source):
|
||||
return datetime.now(UTC)
|
||||
interval = compute_effective_interval(source, artist, settings)
|
||||
return source.last_checked_at + timedelta(seconds=interval)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user