- Organisiert eine Vielzahl von Skripten aus dem Root-Verzeichnis in thematische Unterordner, um die Übersichtlichkeit zu verbessern und die Migration vorzubereiten. - Verschiebt SuperOffice-bezogene Test- und Hilfsskripte in . - Verschiebt Notion-bezogene Synchronisations- und Import-Skripte in . - Archiviert eindeutig veraltete und ungenutzte Skripte in . - Die zentralen Helfer und bleiben im Root, da sie von mehreren Tools als Abhängigkeit genutzt werden.
32 lines
995 B
Python
32 lines
995 B
Python
import requests
|
|
import os
|
|
from requests.auth import HTTPBasicAuth
|
|
|
|
def test_connection(url, name):
|
|
print(f"--- Testing {name}: {url} ---")
|
|
try:
|
|
# We try the health endpoint
|
|
response = requests.get(
|
|
f"{url}/health",
|
|
auth=HTTPBasicAuth("admin", "gemini"),
|
|
timeout=5
|
|
)
|
|
print(f"Status Code: {response.status_code}")
|
|
print(f"Response: {response.text}")
|
|
return response.status_code == 200
|
|
except Exception as e:
|
|
print(f"Error: {e}")
|
|
return False
|
|
|
|
# Path 1: Hardcoded LAN IP through Proxy
|
|
url_lan = "http://192.168.178.6:8090/ce/api"
|
|
# Path 2: Internal Docker Networking (direct)
|
|
url_docker = "http://company-explorer:8000/api"
|
|
|
|
success_lan = test_connection(url_lan, "LAN IP (Proxy)")
|
|
print("\n")
|
|
success_docker = test_connection(url_docker, "Docker Internal (Direct)")
|
|
|
|
if not success_lan and not success_docker:
|
|
print("\nFATAL: Company Explorer not reachable from this container.")
|