File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -198,23 +198,33 @@ async def run():
198198 ```
199199 """
200200
201+ # pylint: disable-next=too-many-arguments
201202 def __init__ (
202203 self ,
203204 * ,
204205 microgrid_id : int ,
205206 server_url : str ,
206207 key : str ,
208+ call_timeout : timedelta = timedelta (seconds = 60 ),
209+ stream_timeout : timedelta = timedelta (minutes = 5 ),
207210 ):
208211 """Initialize the dispatcher.
209212
210213 Args:
211214 microgrid_id: The microgrid id.
212215 server_url: The URL of the dispatch service.
213216 key: The key to access the service.
217+ call_timeout: The timeout for API calls.
218+ stream_timeout: The timeout for streaming API calls.
214219 """
215220 super ().__init__ ()
216221
217- self ._client = DispatchApiClient (server_url = server_url , key = key )
222+ self ._client = DispatchApiClient (
223+ server_url = server_url ,
224+ key = key ,
225+ call_timeout = call_timeout ,
226+ stream_timeout = stream_timeout ,
227+ )
218228 self ._bg_service = DispatchScheduler (
219229 microgrid_id ,
220230 self ._client ,
You can’t perform that action at this time.
0 commit comments