Backup automatico script del 2026-09-27 07:00
This commit is contained in:
1 parent
f347badf3b
commit
09dcbbdadb
24 files changed
+1164
-193
No files matched your search
@@ -78,7 +78,7 @@ class SessionApiClient:
|
||||
f"Imposta {self.service}_PASSWORD_{username.upper()} in .env"
|
||||
)
|
||||
url = urljoin(self.base_url + "/", self.login_path.lstrip("/"))
|
||||
with httpx.Client(timeout=30.0, verify=self.verify_ssl) as client:
|
||||
with httpx.Client(timeout=httpx.Timeout(30.0, connect=5.0), verify=self.verify_ssl) as client:
|
||||
resp = client.post(
|
||||
url, json={"username": service_user, "password": password},
|
||||
)
|
||||
@@ -104,7 +104,7 @@ class SessionApiClient:
|
||||
cookie = self.login(username)
|
||||
url = path if path.startswith("http") else urljoin(self.base_url + "/", path.lstrip("/"))
|
||||
headers = {"Cookie": f"session={cookie}"}
|
||||
with httpx.Client(timeout=60.0, verify=self.verify_ssl) as client:
|
||||
with httpx.Client(timeout=httpx.Timeout(60.0, connect=5.0), verify=self.verify_ssl) as client:
|
||||
resp = client.request(method, url, headers=headers, params=params, json=json_body)
|
||||
if resp.status_code == 401:
|
||||
with _sessions_lock:
|
||||
|
||||