File tree 2 files changed +3
-1
lines changed
2 files changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ class Config(object):
23
23
allow_ip = []
24
24
ws_sub = []
25
25
workers = 1 # default is one worker, multi-worker will case BUG of websocket broadcast
26
+ timeout = 3600 # timeout for waiting response
26
27
27
28
dir_script = ''
28
29
dir_playbook = ''
@@ -43,6 +44,7 @@ def __init__(self):
43
44
'allow_ip' ) else Config .allow_ip
44
45
self .workers = int (cf .get ('default' , 'workers' )) if cf .has_option ('default' , 'workers' ) else Config .workers
45
46
self .ws_sub = cf .get ('default' , 'ws_sub' ).split () if cf .has_option ('default' , 'ws_sub' ) else Config .ws_sub
47
+ self .timeout = int (cf .get ('default' , 'timeout' )) if cf .has_option ('default' , 'timeout' ) else Config .timeout
46
48
47
49
try :
48
50
cf .options ('directory' )
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ def __init__(self, daemon):
31
31
app .add_route (controller .ParseVarsFromFile .as_view (), '/parsevars' )
32
32
app .add_websocket_route (controller .Message .websocket , '/message' , subprotocols = Config .get ('ws_sub' ))
33
33
34
- app .config .update (dict (RESPONSE_TIMEOUT = 1800 )) # timeout for waiting response
34
+ app .config .update (dict (RESPONSE_TIMEOUT = Config . get ( 'timeout' ) )) # timeout for waiting response
35
35
36
36
@app .middleware ('request' )
37
37
async def ip_ban (request ):
You can’t perform that action at this time.
0 commit comments