Merge pull request #1146 from jamiepine/prep/pr-659

fix: replace deprecated datetime.utcnow() with datetime.now(UTC) throughout
This commit is contained in:
capy-ai-staging[bot]
2026-10-04 00:05:36 +00:00
committed by GitHub
12 changed files with 62 additions and 62 deletions
+3 -3
View File
@@ -3,7 +3,7 @@ Task tracking for active downloads and generations.
"""
from typing import Optional, Dict, List
from datetime import datetime
from datetime import UTC, datetime
from dataclasses import dataclass, field
@@ -12,7 +12,7 @@ class DownloadTask:
"""Represents an active download task."""
model_name: str
status: str = "downloading" # downloading, extracting, complete, error
started_at: datetime = field(default_factory=datetime.utcnow)
started_at: datetime = field(default_factory=lambda: datetime.now(UTC))
error: Optional[str] = None
@@ -22,7 +22,7 @@ class GenerationTask:
task_id: str
profile_id: str
text_preview: str # First 50 chars of text
started_at: datetime = field(default_factory=datetime.utcnow)
started_at: datetime = field(default_factory=lambda: datetime.now(UTC))
class TaskManager: