fix(e7): CI-Gate-Vorbereitung — ruff über app/ von 105 auf 0 Findings bereinigt; 8 echte F821-NameError-Produktionsbugs behoben (external_api stream_chat-Call-Signatur an stream_chat_comm angepasst, agent_runner uuid vor lokalem Import, automation/plugin UserTenant-Import, tasks delete-audit user_id, workflows/engine timedelta, unified_search/contracts Any); py311-kompatibles StepHandler-Alias statt type-Statement; E402/F841 bereinigt; Verifikation 85/89 grün (4 Failures = bekannter Vorbestand BUG-099)
Check Cross-Plugin Imports / check (push) Has been cancelled
Check Cross-Plugin Imports / check (push) Has been cancelled
This commit is contained in:
@@ -15,7 +15,7 @@ from __future__ import annotations
|
||||
import logging
|
||||
import time
|
||||
import uuid
|
||||
from datetime import UTC, datetime
|
||||
from datetime import UTC, datetime, timedelta
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import select
|
||||
@@ -313,7 +313,6 @@ class WorkflowEngine:
|
||||
return _instance_to_dict(instance)
|
||||
else:
|
||||
# Retry: stay on same step, set resume_at with backoff
|
||||
import asyncio
|
||||
backoff = min(2 ** instance.retry_count, 60)
|
||||
from datetime import timedelta
|
||||
instance.resume_at = datetime.now(UTC) + timedelta(seconds=backoff)
|
||||
@@ -572,8 +571,8 @@ class WorkflowEngine:
|
||||
|
||||
Prevents two workers from processing the same instance simultaneously.
|
||||
"""
|
||||
|
||||
from app.core.redis import get_redis
|
||||
import redis.asyncio as aioredis
|
||||
|
||||
try:
|
||||
r = await get_redis()
|
||||
|
||||
Reference in New Issue
Block a user