fix: using {NEXTCLOUD_PATH}

This commit is contained in:
administrateur 2025-03-29 18:34:09 +01:00
parent 0546a642d2
commit 93b5f85cfd

View File

@ -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: