From 93b5f85cfd3bd453d78c6c3ef4bb1032fdc3f116 Mon Sep 17 00:00:00 2001 From: administrateur Date: Sat, 29 Mar 2025 18:34:09 +0100 Subject: [PATCH] fix: using {NEXTCLOUD_PATH} --- script_creator.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/script_creator.py b/script_creator.py index e996cf3..624b997 100644 --- a/script_creator.py +++ b/script_creator.py @@ -14,6 +14,7 @@ app = Flask(__name__) NEXTCLOUD_URL_DAV = os.getenv("NEXTCLOUD_URL_DAV") NEXTCLOUD_USER = os.getenv("NEXTCLOUD_USER") NEXTCLOUD_PASSWORD = os.getenv("NEXTCLOUD_PASSWORD") +NEXTCLOUD_PATH = os.getenv("NEXTCLOUD_PATH") N8N_WEBHOOK_URL = os.getenv("N8N_WEBHOOK_URL", "https://n8n.n8n.svc.kube.ia86.cc/webhook/7950310f-e526-475a-82d1-63818da79339") DEBUG = bool(os.getenv("DEBUG", True)) @@ -29,7 +30,7 @@ def log_debug(msg): print(f"🔍 DEBUG: {msg}", flush=True) def sync_from_nextcloud(website, tmp_path): - remote_path = f"/sites/@{website}/" + remote_path = f"/{NEXTCLOUD_PATH}/@{website}/" local_path = tmp_path if os.path.exists(local_path): @@ -60,7 +61,7 @@ def build_mkdocs(): return jsonify({"error": "WEBSITE parameter missing"}), 400 lock_key = f"{lock_prefix}{website}" - log_debug(f"Attempting to acquire Redis lock: {lock_key}") + log_debug(f"Attempting to acquire Redis lock: {lock_key}a") try: lock_acquired = redis_client.set(lock_key, "locked", nx=True, ex=60) except redis.exceptions.ConnectionError as e: