File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -51,11 +51,13 @@ async def consume_all(self) -> AsyncGenerator[Event]:
5151 raise self ._exception
5252 try :
5353 # We use a timeout when waiting for an event from the queue.
54- # This is required because it allows the loop to check if
55- # `self._exception` has been set by the `agent_task_callback`.
54+ # This is required because it allows the loop to check if
55+ # `self._exception` has been set by the `agent_task_callback`.
5656 # Without the timeout, loop might hang indefinitely if no events are
5757 # enqueued by the agent and the agent simply threw an exception
58- event = await asyncio .wait_for (self .queue .dequeue_event (), timeout = self ._timeout )
58+ event = await asyncio .wait_for (
59+ self .queue .dequeue_event (), timeout = self ._timeout
60+ )
5961 logger .debug (
6062 f'Dequeued event of type: { type (event )} in consume_all.'
6163 )
@@ -88,11 +90,7 @@ async def consume_all(self) -> AsyncGenerator[Event]:
8890 continue
8991 except asyncio .QueueShutDown :
9092 break
91-
92-
93-
94-
9593
9694 def agent_task_callback (self , agent_task : asyncio .Task [None ]):
97- if agent_task .exception () is not None :
98- self ._exception = agent_task .exception ()
95+ if agent_task .exception () is not None :
96+ self ._exception = agent_task .exception ()
You can’t perform that action at this time.
0 commit comments