"result" param for webhooks

This commit is contained in:
Jörn-Michael Miehe 2023-09-02 16:30:54 +00:00
parent 41a9446f55
commit 2572afac22
2 changed files with 4 additions and 4 deletions

View file

@ -28,13 +28,13 @@ metrics:
image: yavook/kiwi-simple-metrics:0.1
environment:
METRICS__LOG__ENABLED: "True"
METRICS__WEBHOOK__URL: "https://my.webhook.host/success?report={}"
METRICS__WEBHOOK__FAIL: "https://my.webhook.host/failure?report={}"
METRICS__WEBHOOK__URL: "https://my.webhook.host/success?report={result}"
METRICS__WEBHOOK__FAIL: "https://my.webhook.host/failure?report={result}"
```
- same metrics as above
- logs reports to stdout
- triggers webhooks (`{}` is the placeholder for the result string)
- triggers webhooks (`{result}` is the placeholder for the result string)
## Configuration

View file

@ -126,7 +126,7 @@ class Report:
requests.get(
url=str(url).format(
urllib.parse.quote_plus(self.result)
result=urllib.parse.quote_plus(self.result)
),
verify=not SETTINGS.webhook.insecure,
)