fix(sec): warn when deferred imports stay stale
This commit is contained in:
@@ -413,14 +413,15 @@ class SecFundamentalsImporter:
|
||||
summary=summary,
|
||||
source_max_date=self._latest_index_date,
|
||||
messages=messages,
|
||||
# Pure Company-Facts publication lag is expected and self-healing:
|
||||
# keep the cursor in place and retry, but do not page operators. Any
|
||||
# other missing reason or validation message remains a real failure.
|
||||
# Company-Facts absence is usually publication lag, but can also be a
|
||||
# permanent co-registrant misfile that the daily index did not expose.
|
||||
# Defer quietly at first; the framework warns if promotions stay stale.
|
||||
retryable=(
|
||||
len(messages) == 1
|
||||
and bool(blocking)
|
||||
and all(m.get("reason") == "not_in_companyfacts" for m in blocking)
|
||||
),
|
||||
deferred_alert_after_days=MISSING_XBRL_RETRY_DAYS,
|
||||
)
|
||||
|
||||
async def promote(self, db, staged: StagedFundamentals, run_id: int) -> dict[str, int]:
|
||||
|
||||
Reference in New Issue
Block a user