From 7fccbed7c66156362938774f56b23fa2a9863065 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Mon, 30 Sep 2024 18:52:00 +0100 Subject: [PATCH] CP-49158: [later] introduce a batching delay on first response MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Also introduce a batching delay on all Event.{from,next} calls, except Event.from calls for tasks. This should help batch up multiple events from field updates. There are no extra delays for tasks, because these typically aren't immediately ready, and when they are we want to immediately find out about it. This is part of the "feature flag" that turns on the feature (previously you could've manually edited xapi.conf to make these changes.) Signed-off-by: Edwin Török --- ocaml/xapi/xapi_globs.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ocaml/xapi/xapi_globs.ml b/ocaml/xapi/xapi_globs.ml index 140f8d355e..cabb1fc707 100644 --- a/ocaml/xapi/xapi_globs.ml +++ b/ocaml/xapi/xapi_globs.ml @@ -1097,7 +1097,8 @@ let make_batching name ~delay_before ~delay_between = (config, (name, Arg.String set, get, desc)) let event_from_delay, event_from_entry = - make_batching "event_from" ~delay_before:Mtime.Span.zero + make_batching "event_from" + ~delay_before:Mtime.Span.(50 * ms) ~delay_between:Mtime.Span.(50 * ms) let event_from_task_delay, event_from_task_entry =