From e2c459a4976757134f1314488bf40dff34786e6c Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Fri, 23 Feb 2024 14:38:16 -0500 Subject: [PATCH] Only spawn the extensions reconciliation task in the collab service (#8301) This PR makes it so the background task that reconciles the extensions database with the blob store only runs on the `collab` service. This avoids us having multiple of these jobs running at once. Release Notes: - N/A --- crates/collab/src/main.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/crates/collab/src/main.rs b/crates/collab/src/main.rs index 45de396165dc944196e467d6bcebf9fea6a580c9..5f4a24a70a2a363b57be21be8e326b6923b0b315 100644 --- a/crates/collab/src/main.rs +++ b/crates/collab/src/main.rs @@ -63,7 +63,10 @@ async fn main() -> Result<()> { None }; - fetch_extensions_from_blob_store_periodically(state.clone(), Executor::Production); + // TODO: Once we move the extensions endpoints to run inside `api` service, move the background task as well. + if !is_api_only { + fetch_extensions_from_blob_store_periodically(state.clone(), Executor::Production); + } let mut app = collab::api::routes(rpc_server.clone(), state.clone()); if let Some(rpc_server) = rpc_server.clone() {