Skip to content

Commit

Permalink
Only spawn the extensions reconciliation task in the collab service (z…
Browse files Browse the repository at this point in the history
…ed-industries#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
  • Loading branch information
maxdeviant authored Feb 23, 2024
1 parent 7c514d0 commit d3a38c6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crates/collab/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down

0 comments on commit d3a38c6

Please sign in to comment.