deploy: Dockerfile, Compose pro Rolle, LiteLLM, Prometheus/Alertmanager, Canary-Prober, n8n-Workflows
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -52,14 +52,15 @@ class LoggingJobRunner:
|
||||
|
||||
|
||||
class WebhookJobRunner:
|
||||
def __init__(self, url: str, client: Any | None = None):
|
||||
def __init__(self, url: str, auth: str = "", client: Any | None = None):
|
||||
import httpx
|
||||
|
||||
self.url = url
|
||||
self.headers = {"Authorization": auth} if auth else {}
|
||||
self.client = client or httpx.Client(timeout=15.0)
|
||||
|
||||
def submit(self, job: str, candidate: dict[str, Any]) -> str:
|
||||
resp = self.client.post(self.url, json={"job": job, "candidate": candidate})
|
||||
resp = self.client.post(self.url, json={"job": job, "candidate": candidate}, headers=self.headers)
|
||||
resp.raise_for_status()
|
||||
return f"Job {job} übergeben"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user