Fix e2e tests

This commit is contained in:
Roman Meshko
2026-05-15 12:45:18 +03:00
parent 2eb5b5d8ad
commit 255ec36f8a
3 changed files with 11 additions and 3 deletions
+4
View File
@@ -515,6 +515,8 @@ async def detect_image(
_post_annotation_to_service(token_mgr, content_hash, annotation, dtos)
def run_sync():
if not inf.is_engine_ready:
raise RuntimeError("Detection service unavailable")
inf.run_detect_image(image_bytes, ai_cfg, media_name, on_annotation)
try:
@@ -609,6 +611,8 @@ async def detect_video_upload(
_post_annotation_to_service(token_mgr, mid, annotation, dtos)
def run_inference():
if not inf.is_engine_ready:
raise RuntimeError("Detection service unavailable")
inf.run_detect_video_stream(buffer, ai_cfg, media_name, on_annotation, lambda *_: None)
inference_future = loop.run_in_executor(executor, run_inference)