Przeglądaj źródła

change stop sequence

Tuan Nguyen 1 rok temu
rodzic
commit
254ae37c4c
1 zmienionych plików z 3 dodań i 4 usunięć
  1. 3 4
      app.py

+ 3 - 4
app.py

@@ -222,15 +222,14 @@ def run_theta_rho_files(
             run_theta_rho_file(path)
             run_theta_rho_file(path)
 
 
             if idx < len(file_paths) - 1:
             if idx < len(file_paths) - 1:
+                if stop_requested:
+                    print("Execution stopped before running the next clear pattern.")
+                    return
                 # Pause after each pattern if requested
                 # Pause after each pattern if requested
                 if pause_time > 0:
                 if pause_time > 0:
                     print(f"Pausing for {pause_time} seconds...")
                     print(f"Pausing for {pause_time} seconds...")
                     time.sleep(pause_time)
                     time.sleep(pause_time)
 
 
-                if stop_requested:
-                    print("Execution stopped before running the next clear pattern.")
-                    return
-
                 # Determine the clear pattern to run
                 # Determine the clear pattern to run
                 clear_file_path = get_clear_pattern_file(clear_pattern)
                 clear_file_path = get_clear_pattern_file(clear_pattern)
                 print(f"Running clear pattern: {clear_file_path}")
                 print(f"Running clear pattern: {clear_file_path}")