mirror of
https://github.com/eigent-ai/eigent.git
synced 2026-04-28 11:40:25 +00:00
enhance: Chore/optimize workforce construct PR970
This commit is contained in:
parent
23fcbb3f3a
commit
e385532dea
3 changed files with 28 additions and 147 deletions
|
|
@ -115,15 +115,12 @@ async def timeout_stream_wrapper(stream_generator, timeout_seconds: int = SSE_TI
|
|||
@router.post("/chat", name="start chat")
|
||||
@traceroot.trace()
|
||||
async def post(data: Chat, request: Request):
|
||||
request_start_time = time.time()
|
||||
chat_logger.info(
|
||||
"Starting new chat session",
|
||||
extra={"project_id": data.project_id, "task_id": data.task_id, "user": data.email}
|
||||
)
|
||||
|
||||
task_lock = get_or_create_task_lock(data.project_id)
|
||||
# Store request start time in task_lock for downstream timing
|
||||
task_lock.request_start_time = request_start_time
|
||||
|
||||
# Set user-specific environment path for this thread
|
||||
set_user_env_path(data.env_path)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue