feat(docker): implement supervisor and secure API endpoints

Add supervisor configuration for managing Redis and Gunicorn processes
Replace direct process management with supervisord
Add secure and token-free API server variants
Implement JWT authentication for protected endpoints
Update datetime handling in async dispatcher
Add email domain verification

BREAKING CHANGE: Server startup now uses supervisord instead of direct process management
This commit is contained in:
UncleCode
2025-02-17 20:31:20 +08:00
parent 8bb799068e
commit 2864015469
12 changed files with 790 additions and 79 deletions

View File

@@ -1,3 +1,4 @@
from re import U
from pydantic import BaseModel, HttpUrl
from typing import List, Dict, Optional, Callable, Awaitable, Union, Any
from enum import Enum
@@ -24,8 +25,8 @@ class CrawlerTaskResult:
result: "CrawlResult"
memory_usage: float
peak_memory: float
start_time: datetime
end_time: datetime
start_time: Union[datetime, float]
end_time: Union[datetime, float]
error_message: str = ""
@@ -100,8 +101,8 @@ class DispatchResult(BaseModel):
task_id: str
memory_usage: float
peak_memory: float
start_time: datetime
end_time: datetime
start_time: Union[datetime, float]
end_time: Union[datetime, float]
error_message: str = ""