File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -192,6 +192,11 @@ Dictionary. Current available keys are:
192192 Integer. Sets the back off time in seconds for reries of
193193 the database connection process. Default value is ``5 ``.
194194
195+ - query_timeout
196+
197+ Integer. Sets the timeout in seconds for the database query.
198+ Default value is ``0 `` which disables the timeout.
199+
195200backend-specific settings
196201~~~~~~~~~~~~~~~~~~~~~~~~~
197202
Original file line number Diff line number Diff line change @@ -295,6 +295,7 @@ def get_new_connection(self, conn_params):
295295 timeout = options .get ('connection_timeout' , 0 )
296296 retries = options .get ('connection_retries' , 5 )
297297 backoff_time = options .get ('connection_retry_backoff_time' , 5 )
298+ query_timeout = options .get ('query_timeout' , 0 )
298299
299300 conn = None
300301 retry_count = 0
@@ -317,6 +318,7 @@ def get_new_connection(self, conn_params):
317318 if not need_to_retry :
318319 raise
319320
321+ conn .timeout = query_timeout
320322 return conn
321323
322324 def init_connection_state (self ):
You can’t perform that action at this time.
0 commit comments