fix(freshness): пороги nspd_geo под on-demand каденцию (убирает еженедельный ложный stale) #2325
1 changed files with 3 additions and 5 deletions
|
|
@ -89,8 +89,8 @@ def test_freshness_mixed_statuses() -> None:
|
|||
"last_status": None,
|
||||
},
|
||||
"nspd_geo_jobs": {
|
||||
"last_success_at": _ago(40.0), # >= stale_days=30 → critical → failed
|
||||
"last_attempt_at": _ago(40.0),
|
||||
"last_success_at": _ago(100.0), # >= stale_days=90 → critical → failed
|
||||
"last_attempt_at": _ago(100.0),
|
||||
"upd_24h": 0,
|
||||
"upd_7d": 0,
|
||||
"last_status": "done",
|
||||
|
|
@ -230,9 +230,7 @@ def test_freshness_all_healthy() -> None:
|
|||
"last_status": "done",
|
||||
"recent_output": 100000, # выше любого floor → flagged-источники ok
|
||||
}
|
||||
rows = {
|
||||
s.table: dict(fresh_row) for s in admin_scrape._FRESHNESS_SOURCES
|
||||
}
|
||||
rows = {s.table: dict(fresh_row) for s in admin_scrape._FRESHNESS_SOURCES}
|
||||
_override_db(_make_db(rows))
|
||||
try:
|
||||
resp = TestClient(app).get(ENDPOINT)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue