feat(STATE-WP-0064): start parallel week with source-tagged sweep runners
Tag consistency_sweep_remote_all progress events by source, route the local timer through the API, add a parallel-week comparison script, and document the 2026-06-21 to 2026-06-28 observation window for T03.
This commit is contained in:
parent
696b628142
commit
ab14e77e77
9 changed files with 157 additions and 16 deletions
|
|
@ -8,6 +8,7 @@ import sys
|
|||
import uuid
|
||||
from datetime import UTC, datetime
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
|
|
@ -95,6 +96,7 @@ async def run_remote_all_sweep(
|
|||
session: AsyncSession,
|
||||
*,
|
||||
max_seconds: int,
|
||||
source: str = "api",
|
||||
) -> ConsistencySweepRemoteAllRun:
|
||||
started_at = datetime.now(tz=UTC)
|
||||
cmd = [
|
||||
|
|
@ -124,6 +126,7 @@ async def run_remote_all_sweep(
|
|||
started_at=started_at,
|
||||
completed_at=completed_at,
|
||||
max_seconds=max_seconds,
|
||||
source=source,
|
||||
exit_code=result.returncode,
|
||||
lock_skipped=lock_skipped,
|
||||
repos_processed=repos_processed,
|
||||
|
|
@ -133,6 +136,7 @@ async def run_remote_all_sweep(
|
|||
started_at=started_at,
|
||||
completed_at=completed_at,
|
||||
max_seconds=max_seconds,
|
||||
source=source,
|
||||
exit_code=result.returncode,
|
||||
lock_skipped=lock_skipped,
|
||||
repos_processed=repos_processed,
|
||||
|
|
@ -149,6 +153,7 @@ async def _log_sweep_progress(
|
|||
started_at: datetime,
|
||||
completed_at: datetime,
|
||||
max_seconds: int,
|
||||
source: str,
|
||||
exit_code: int,
|
||||
lock_skipped: bool,
|
||||
repos_processed: list[ConsistencySweepRepoResult],
|
||||
|
|
@ -175,6 +180,7 @@ async def _log_sweep_progress(
|
|||
"started_at": _iso(started_at),
|
||||
"completed_at": _iso(completed_at),
|
||||
"max_seconds": max_seconds,
|
||||
"source": source,
|
||||
"exit_code": exit_code,
|
||||
"lock_skipped": lock_skipped,
|
||||
"repos_processed": [item.model_dump(mode="json") for item in repos_processed],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue