From f2f1367ec3f599aeb225d556a6d2e43f626f2671 Mon Sep 17 00:00:00 2001 From: Tamo Date: Tue, 19 Mar 2024 14:53:50 +0100 Subject: [PATCH] add a timeout to the webhook --- index-scheduler/src/lib.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/index-scheduler/src/lib.rs b/index-scheduler/src/lib.rs index adb3d4942..46ed76649 100644 --- a/index-scheduler/src/lib.rs +++ b/index-scheduler/src/lib.rs @@ -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 {