Write a trace to ClickHouse with a timeout
(trace: Trace)
| 478 | |
| 479 | |
| 480 | async def write_trace_with_timeout(trace: Trace) -> None: |
| 481 | """Write a trace to ClickHouse with a timeout""" |
| 482 | try: |
| 483 | write_task = asyncio.create_task(clickhouse_create_trace(trace)) |
| 484 | await asyncio.wait_for(write_task, timeout=TIMEOUT) |
| 485 | return True |
| 486 | except asyncio.TimeoutError: |
| 487 | write_dropped_record('trace', trace.id, "Timeout") |
| 488 | return False |
| 489 | except Exception as e: |
| 490 | write_dropped_record('trace', trace.id, str(e)) |
| 491 | return False |
| 492 | |
| 493 | |
| 494 | async def process_page(offset: int, limit: int) -> None: |
no test coverage detected
searching dependent graphs…