mirror of
https://github.com/azaion/detections.git
synced 2026-06-21 08:31:08 +00:00
Fixed prevent smoke builds and keep SSE streams alive
This commit is contained in:
@@ -4,8 +4,9 @@
|
||||
# here so builds are gated on a green test run.
|
||||
|
||||
when:
|
||||
event: [push, manual]
|
||||
branch: [dev, stage, main]
|
||||
- event: [push, manual]
|
||||
branch: [dev, stage, main]
|
||||
evaluate: 'E2E_CONVERT_JETSON != "1" && E2E_SMOKE_TEST != "1"'
|
||||
|
||||
# Multi-arch matrix. detections is the only repo today with split per-arch
|
||||
# Dockerfiles (Jetson uses Dockerfile.jetson with TensorRT/CUDA on L4T;
|
||||
|
||||
@@ -17,7 +17,7 @@ def _percentile_ms(sorted_ms, p):
|
||||
return sorted_ms[lo] * (1 - w) + sorted_ms[hi] * w
|
||||
|
||||
|
||||
@pytest.mark.timeout(60)
|
||||
@pytest.mark.timeout(240)
|
||||
def test_nft_perf_01_single_image_latency_p95(
|
||||
warm_engine, image_detect, image_small
|
||||
):
|
||||
@@ -39,7 +39,7 @@ def test_nft_perf_01_single_image_latency_p95(
|
||||
assert p95 < threshold_ms
|
||||
|
||||
|
||||
@pytest.mark.timeout(60)
|
||||
@pytest.mark.timeout(120)
|
||||
def test_nft_perf_03_tiling_overhead_large_image(
|
||||
warm_engine, image_detect, image_small, image_large
|
||||
):
|
||||
|
||||
+5
-2
@@ -415,8 +415,11 @@ async def detect_events(channel_id: str, request: Request, after_ts: Optional[in
|
||||
if ts_ms > after_ts:
|
||||
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
||||
while True:
|
||||
ts_ms, data = await queue.get()
|
||||
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
||||
try:
|
||||
ts_ms, data = await asyncio.wait_for(queue.get(), timeout=1.0)
|
||||
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
||||
except asyncio.TimeoutError:
|
||||
yield ": heartbeat\n\n"
|
||||
except asyncio.CancelledError:
|
||||
pass
|
||||
finally:
|
||||
|
||||
Reference in New Issue
Block a user