File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ async def execute(self) -> LookupArtifacts:
4545 self .job_log .info ("Starting lookup against Tier 0..." )
4646
4747 try :
48- timeout = None if self .ctx .timeout < 0 else self .ctx .timeout - 0.5
48+ timeout = None if self .ctx .timeout < 0 else self .ctx .timeout
4949 async with asyncio .timeout (timeout ):
5050 backend_results = await self .get_results (
5151 QueryGraphDict (** self .qgraph .model_dump ())
Original file line number Diff line number Diff line change @@ -235,7 +235,7 @@ async def execute_branch(
235235 while parallel_tasks :
236236 timeout = (
237237 max (
238- self .ctx .timeout - (time .time () - self .start_time ) - 0.5 ,
238+ self .ctx .timeout - (time .time () - self .start_time ),
239239 0 ,
240240 )
241241 if self .ctx .timeout >= 0
@@ -561,7 +561,7 @@ async def timeout(self) -> None:
561561 try :
562562 if self .ctx .timeout < 0 :
563563 return
564- await asyncio .sleep (max ( self .ctx .timeout - 0.5 , 0 ) )
564+ await asyncio .sleep (self .ctx .timeout )
565565 self .job_log .error ("QGX hit timeout, attempting wrapup..." )
566566 self .terminate = True
567567 except asyncio .CancelledError :
Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ async def make_query(
6060 Unhandled errors are handled by middleware.
6161 """
6262 job_id = uuid .uuid4 ().hex
63- timeout : int = {
63+ timeout : float = {
6464 "lookup" : CONFIG .job .lookup .timeout ,
6565 "metakg" : CONFIG .job .metakg .timeout ,
6666 }[func ]
Original file line number Diff line number Diff line change @@ -54,7 +54,7 @@ class QueryInfo(NamedTuple):
5454 body : Query | AsyncQuery | None
5555 job_id : str
5656 tiers : set [TierNumber ]
57- timeout : int
57+ timeout : float
5858
5959
6060class BackendResults (TypedDict ):
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ class ParametersDict(TypedDict):
2525 """Query Parameters."""
2626
2727 tiers : list [int ]
28- timeout : int
28+ timeout : float
2929
3030
3131class QueryDict (TypedDict ):
Original file line number Diff line number Diff line change @@ -15,7 +15,7 @@ class Parameters(BaseModel):
1515 """Parameters that govern some elements of query execution behavior."""
1616
1717 timeout : Annotated [
18- int | None ,
18+ float | None ,
1919 Field (
2020 description = "Custom query timeout in seconds. Defaults to server default if not set. Set to -1 to disable timeout entirely."
2121 ),
You can’t perform that action at this time.
0 commit comments