zhangjf commited on
Commit
26545b6
1 Parent(s): 22e54ff

add timeout=30s

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -125,7 +125,7 @@ def askingChatGPT(qs, qas, min_interval_seconds=3, max_interval_seconds=30):
125
  return a
126
  except concurrent.futures.TimeoutError:
127
  print('ask call timed out after', timeout, 'seconds, retrying...')
128
- executor.shutdown(wait=False, cancel_futures=True)
129
  return ask_(q, timeout*2) # 当超时时,重新调用函数
130
  a = ask_(q, max_interval_seconds)
131
 
 
125
  return a
126
  except concurrent.futures.TimeoutError:
127
  print('ask call timed out after', timeout, 'seconds, retrying...')
128
+ executor.shutdown(wait=False)
129
  return ask_(q, timeout*2) # 当超时时,重新调用函数
130
  a = ask_(q, max_interval_seconds)
131