diff options
| author | diogo464 <[email protected]> | 2025-06-03 18:22:21 +0100 |
|---|---|---|
| committer | diogo464 <[email protected]> | 2025-06-03 18:22:21 +0100 |
| commit | f51ed2a84e5dba82d037bae329de8a2f5cb4ebb6 (patch) | |
| tree | 54abc73ff2bf70cfdf9440973df5a1f9d5a6bf58 | |
| parent | 6141bf42454d38f72665ff16706bac00da2825d7 (diff) | |
Increase bonsai execution timeout from 30 seconds to 5 minutes - Updated subprocess timeout in app.py from 30 to 300 seconds - Updated timeout error message to reflect 5 minute limit - Allows bonsai tool more time to process complex network configurations
| -rw-r--r-- | app.py | 4 |
1 files changed, 2 insertions, 2 deletions
| @@ -122,7 +122,7 @@ def generate_files(): | |||
| 122 | 122 | ||
| 123 | try: | 123 | try: |
| 124 | result = subprocess.run( | 124 | result = subprocess.run( |
| 125 | cmd, cwd=bonsai_dir, capture_output=True, text=True, timeout=30 | 125 | cmd, cwd=bonsai_dir, capture_output=True, text=True, timeout=300 |
| 126 | ) | 126 | ) |
| 127 | 127 | ||
| 128 | if result.returncode != 0: | 128 | if result.returncode != 0: |
| @@ -148,7 +148,7 @@ def generate_files(): | |||
| 148 | return jsonify({"error": error_msg}), 500 | 148 | return jsonify({"error": error_msg}), 500 |
| 149 | 149 | ||
| 150 | except subprocess.TimeoutExpired: | 150 | except subprocess.TimeoutExpired: |
| 151 | error_msg = "Bonsai execution timed out after 30 seconds" | 151 | error_msg = "Bonsai execution timed out after 5 minutes" |
| 152 | if TEST_ENVIRONMENT: | 152 | if TEST_ENVIRONMENT: |
| 153 | print(f"WARNING: {error_msg}. Creating dummy files for testing.") | 153 | print(f"WARNING: {error_msg}. Creating dummy files for testing.") |
| 154 | edges_content = "1,2,0.5\n2,3,0.3\n1,3,0.8\n" | 154 | edges_content = "1,2,0.5\n2,3,0.3\n1,3,0.8\n" |
