Increase subprocess docker timeout
This commit is contained in:
parent
09d9f3168a
commit
6dea73b9cc
|
@ -84,7 +84,7 @@ def discourse_api_delete(url, data={}):
|
||||||
|
|
||||||
def discourse_rails_script(script):
|
def discourse_rails_script(script):
|
||||||
result = subprocess.run(['docker', 'exec', '-i', secrets.DISCOURSE_CONTAINER, 'rails', 'runner', script],
|
result = subprocess.run(['docker', 'exec', '-i', secrets.DISCOURSE_CONTAINER, 'rails', 'runner', script],
|
||||||
shell=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
shell=False, text=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE, timeout=30)
|
||||||
output = result.stdout or result.stderr
|
output = result.stdout or result.stderr
|
||||||
output = output.strip() or 'No complaints'
|
output = output.strip() or 'No complaints'
|
||||||
return result, output
|
return result, output
|
||||||
|
|
Loading…
Reference in New Issue
Block a user