Changeset View
Changeset View
Standalone View
Standalone View
swh/scheduler/journal_client.py
Show First 20 Lines • Show All 54 Lines • ▼ Show 20 Lines | for msg_dict in messages[msg_type]: | ||||
"last_uneventful": None, | "last_uneventful": None, | ||||
"last_eventful": None, | "last_eventful": None, | ||||
"last_failed": None, | "last_failed": None, | ||||
"last_notfound": None, | "last_notfound": None, | ||||
"last_snapshot": None, | "last_snapshot": None, | ||||
} | } | ||||
pk = origin, visit_type | pk = origin, visit_type | ||||
if pk not in origin_visit_stats: | if pk not in origin_visit_stats: | ||||
visit_stats = scheduler.origin_visit_stats_get(origin, visit_type) | visit_stats = scheduler.origin_visit_stats_get([pk]).get(pk) | ||||
origin_visit_stats[pk] = ( | origin_visit_stats[pk] = ( | ||||
attr.asdict(visit_stats) if visit_stats else empty_object | attr.asdict(visit_stats) if visit_stats else empty_object | ||||
) | ) | ||||
visit_stats_d = origin_visit_stats[pk] | visit_stats_d = origin_visit_stats[pk] | ||||
if msg_dict["status"] == "not_found": | if msg_dict["status"] == "not_found": | ||||
visit_stats_d["last_notfound"] = max_date( | visit_stats_d["last_notfound"] = max_date( | ||||
▲ Show 20 Lines • Show All 51 Lines • Show Last 20 Lines |