INNER CODE UNIT · Python

_empty_history

lij768423-svg/grok-register-panel · batch_traffic.py:86

def _empty_history() -> dict:
    return {"version": HISTORY_SCHEMA_VERSION, "batches": []}


def _history_entry(raw: object) -> dict | None:
    if not isinstance(raw, dict):
        return None
    batch_id = str(raw.get("batch_id") or "")[:96]
    if not batch_id:
        return None
    entry = {
        "batch_id": batch_id,
        "started_at": raw.get("started_at"),
        "finished_at": raw.get("finished_at"),
        "bytes_up": 0,
        "bytes_down": 0,
        "bytes_total": 0,
        "successful_accounts": 0,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…