Skip to content

Commit

Permalink
Update ct-app/core/components/graphql_providers.py
Browse files Browse the repository at this point in the history
Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com>
  • Loading branch information
jeandemeusy and coderabbitai[bot] authored May 2, 2024
1 parent 48372f0 commit c9ff47d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ct-app/core/components/graphql_providers.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ async def _test_query(self, key: str, **kwargs) -> bool:
vars.update(kwargs)

# call `self._execute(self._sku_query, vars)` with a timeout
response = await asyncio.wait_for(self._execute(self._sku_query, vars), timeout=30)
try:
response = await asyncio.wait_for(self._execute(self._sku_query, vars), timeout=30)
except asyncio.TimeoutError:
self.error("Query timeout occurred")
return False

return response and key in response

Expand Down

0 comments on commit c9ff47d

Please sign in to comment.