From f51ed2a84e5dba82d037bae329de8a2f5cb4ebb6 Mon Sep 17 00:00:00 2001 From: diogo464 Date: Tue, 3 Jun 2025 18:22:21 +0100 Subject: 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 --- app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app.py') diff --git a/app.py b/app.py index d862310..c3057a0 100644 --- a/app.py +++ b/app.py @@ -122,7 +122,7 @@ def generate_files(): try: result = subprocess.run( - cmd, cwd=bonsai_dir, capture_output=True, text=True, timeout=30 + cmd, cwd=bonsai_dir, capture_output=True, text=True, timeout=300 ) if result.returncode != 0: @@ -148,7 +148,7 @@ def generate_files(): return jsonify({"error": error_msg}), 500 except subprocess.TimeoutExpired: - error_msg = "Bonsai execution timed out after 30 seconds" + error_msg = "Bonsai execution timed out after 5 minutes" if TEST_ENVIRONMENT: print(f"WARNING: {error_msg}. Creating dummy files for testing.") edges_content = "1,2,0.5\n2,3,0.3\n1,3,0.8\n" -- cgit