Explorar el Código

Up the timeout on set_input_data in performance/utils.py

jonathanvdc hace 8 años
padre
commit
cf42258d0f
Se han modificado 1 ficheros con 4 adiciones y 2 borrados
  1. 4 2
      performance/utils.py

+ 4 - 2
performance/utils.py

@@ -26,6 +26,8 @@ PARALLEL_PUSH = True
 BOOTSTRAP_FOLDER_NAME = "bootstrap"
 CURRENT_FOLDER_NAME = "performance"
 
+MODELVERSE_TIMEOUT = 600
+
 PORTS = set()
 
 OPTIMIZATION_LEVEL_LEGACY_INTERPRETER = "legacy-interpreter"
@@ -100,7 +102,7 @@ def set_input_data(address, data):
                 address,
                 urllib.urlencode(
                     {"op": "set_input", "data": json.dumps(data), "taskname": USERNAME})),
-            timeout=10).read()
+            timeout=MODELVERSE_TIMEOUT).read()
     else:
         return []
 
@@ -108,7 +110,7 @@ def compile_file(address, mod_filename, filename, mode, proc):
     """Compiles the given file."""
     # Load in the file required
     try:
-        timeout_val = 600
+        timeout_val = MODELVERSE_TIMEOUT
         taskname = str(random.random())
         while 1:
             proc2 = execute(