From 2e078cbffd83ec28ba01823fa6b6145a0850f1fe Mon Sep 17 00:00:00 2001 From: Lino Giger <68745352+LinoGiger@users.noreply.github.com> Date: Thu, 16 Apr 2026 10:59:42 +0200 Subject: [PATCH 1/2] added preheating --- src/rapidata/rapidata_client/flow/rapidata_flow_manager.py | 6 ++++++ uv.lock | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py b/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py index d3086651..0ebd31b0 100644 --- a/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py +++ b/src/rapidata/rapidata_client/flow/rapidata_flow_manager.py @@ -139,6 +139,12 @@ def find_flows( for flow in response.items ] + def preheat(self) -> None: + """Preheat the boost system to reduce latency for upcoming flow items.""" + with tracer.start_as_current_span("RapidataFlowManager.preheat"): + logger.debug("Preheating boost") + self._openapi_service.campaign.campaign_api.campaign_boost_preheat_post() + def __str__(self) -> str: return "RapidataFlowManager" diff --git a/uv.lock b/uv.lock index efb3d210..777720d4 100644 --- a/uv.lock +++ b/uv.lock @@ -2558,7 +2558,7 @@ wheels = [ [[package]] name = "rapidata" -version = "3.7.1" +version = "3.7.3" source = { editable = "." } dependencies = [ { name = "authlib" }, From f02c5d0237b6c3e6cef52d48e2ad7a01934749c9 Mon Sep 17 00:00:00 2001 From: Lino Giger <68745352+LinoGiger@users.noreply.github.com> Date: Thu, 16 Apr 2026 11:10:33 +0200 Subject: [PATCH 2/2] added preheating to docs --- docs/flows.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/flows.md b/docs/flows.md index 5ac29df9..7bc944f0 100644 --- a/docs/flows.md +++ b/docs/flows.md @@ -123,6 +123,16 @@ flow.update_config( This config will only affect new flow items and not modify existing ones. +### Preheating + +If you need low-latency responses for upcoming flow items, you can preheat the system beforehand: + +```python +client.flow.preheat() +``` + +This warms up internal resources so that subsequent flow batches are processed faster. Call it before submitting time-sensitive batches. + ### Retrieving Existing Flows You can retrieve flows by ID or list your recent flows: