Add hourly RecentlyOnScope batch endpoint

This commit is contained in:
2026-05-22 16:14:08 +02:00
parent c95d29023d
commit cea59d7f13
5 changed files with 297 additions and 0 deletions

View File

@@ -1,5 +1,6 @@
from __future__ import annotations
import uuid
from datetime import datetime
from pydantic import BaseModel, Field
@@ -33,3 +34,32 @@ class RecentlyOnScopeReportMetadata(BaseModel):
class RecentlyOnScopeGeneratedReport(RecentlyOnScopeReportMetadata):
markdown: str
class RecentlyOnScopeHourlyGenerate(RecentlyOnScopeGenerate):
active_only: bool = True
include_attention: bool = False
class RecentlyOnScopeSkippedDomain(BaseModel):
domain_slug: str
reason: str
source_counts: RecentlyOnScopeSourceCounts
class RecentlyOnScopeFailedDomain(BaseModel):
domain_slug: str
error: str
class RecentlyOnScopeHourlyRun(BaseModel):
range: str
since: datetime
until: datetime
generated_at: datetime
active_only: bool
include_attention: bool
generated: list[RecentlyOnScopeReportMetadata] = Field(default_factory=list)
skipped: list[RecentlyOnScopeSkippedDomain] = Field(default_factory=list)
failed: list[RecentlyOnScopeFailedDomain] = Field(default_factory=list)
progress_event_id: uuid.UUID | None = None