Enhance job logging and UI updates
- Implement job logging functionality to track progress and events for each job. - Add a new section in the job card to display session logs with detailed entries. - Update job statistics to include pages fetched, pages found, and assets processed. - Modify the UI theme and text for better clarity and aesthetics. - Adjust tests to validate new logging features and ensure proper event handling.
This commit is contained in:
+8
-2
@@ -184,12 +184,17 @@ class CaptureService:
|
||||
)
|
||||
|
||||
def update(
|
||||
phase: str, message: str, stats: dict[str, int], warnings: list[str]
|
||||
phase: str,
|
||||
message: str,
|
||||
stats: dict[str, int],
|
||||
warnings: list[str],
|
||||
detail: dict[str, object] | None = None,
|
||||
) -> None:
|
||||
nonlocal last_progress_at, last_progress_phase
|
||||
now = time.monotonic()
|
||||
if (
|
||||
phase == last_progress_phase
|
||||
detail is None
|
||||
and phase == last_progress_phase
|
||||
and now - last_progress_at < PROGRESS_WRITE_INTERVAL_SECONDS
|
||||
):
|
||||
return
|
||||
@@ -203,6 +208,7 @@ class CaptureService:
|
||||
message=message,
|
||||
stats=stats,
|
||||
warnings=warnings,
|
||||
detail=detail,
|
||||
)
|
||||
if not renewed:
|
||||
raise CaptureCancelled("Capture lease was reassigned")
|
||||
|
||||
Reference in New Issue
Block a user