Increase subprocess docker timeout

This commit is contained in:
Tanner Collin 2022-07-05 03:47:06 +00:00
parent 09d9f3168a
commit 6dea73b9cc

View File

@ -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