add a timeout to the webhook

This commit is contained in:
Tamo 2024-03-19 14:53:50 +01:00
parent 344356c988
commit ac60c5aa89

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 {