(
sqlite_path: str, query: str, process_id: str = "", timeout: int = TIMEOUT
)
| 158 | |
| 159 | |
| 160 | async def exec_on_db( |
| 161 | sqlite_path: str, query: str, process_id: str = "", timeout: int = TIMEOUT |
| 162 | ) -> Tuple[str, Any]: |
| 163 | try: |
| 164 | return await asyncio.wait_for(exec_on_db_(sqlite_path, query), timeout) |
| 165 | except asyncio.TimeoutError: |
| 166 | return ('exception', TimeoutError) |
| 167 | except Exception as e: |
| 168 | return ("exception", e) |
| 169 | |
| 170 | |
| 171 | # postprocess the model predictions to avoid execution errors |
no test coverage detected