(20251122) Reverted formatting and added a semaphore.

This commit is contained in:
2025-11-22 14:57:40 +05:30
parent cbc151570b
commit 071f86e552
4 changed files with 71 additions and 59 deletions
+8
View File
@@ -38,6 +38,9 @@ sys.path.append("..")
# System-level:
import os
# To work with date and time:
import time
import datetime
# For using Quart:
@@ -123,6 +126,11 @@ def load_from_cosec(
downloads_dir = os.path.join(base_dir, r"downloads")
masters_dir = os.path.join(base_dir, r"masters")
# First kill the previous processes:
kill_count = CosecWeb.kill_chrome_processes()
current_app.printer("Killed Chrome Procs.", kill_count)
if kill_count > 0: time.sleep(2.5)
# Create an instance of the automation object:
current_app.cosec = CosecWeb(
cosec_url = cosec_url,