add a timeout to the webhook

This commit is contained in:
Tamo 2024-03-19 14:53:50 +01:00 committed by Clément Renault
parent 18f17ed728
commit f2f1367ec3
No known key found for this signature in database
GPG Key ID: F250A4C4E3AE5F5F
1 changed files with 1 additions and 0 deletions

View File

@ -1396,6 +1396,7 @@ impl IndexScheduler {
// let reader = GzEncoder::new(BufReader::new(task_reader), Compression::default());
let reader = GzEncoder::new(BufReader::new(task_reader), Compression::default());
let request = ureq::post(url)
.timeout(Duration::from_secs(30))
.set("Content-Encoding", "gzip")
.set("Content-Type", "application/x-ndjson");
let request = match &self.webhook_authorization_header {