Skip to content

Commit

Permalink
[CLN] Remove unused worker_entrypoint (#1954)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - Improvements & Bug fixes
	 - This PR cleans up unused worker_entrypoint
 - New functionality
	 - ...

## Test plan
*How are these changes tested?*

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js,
`cargo test` for rust

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
Ishiihara authored Apr 1, 2024
1 parent b6e86a6 commit d8c1055
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions rust/worker/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,44 +75,3 @@ pub async fn compaction_service_entrypoint() {
let mut compaction_manager_handle = system.start_component(compaction_manager);
tokio::join!(compaction_manager_handle.join(), dispatcher_handle.join());
}

pub async fn worker_entrypoint() {
let config = config::RootConfig::load();
// Create all the core components and start them
// TODO: This should be handled by an Application struct and we can push the config into it
// for now we expose the config to pub and inject it into the components

// The two root components are ingest, and the gRPC server
let mut system: system::System = system::System::new();

let mut memberlist =
match memberlist::CustomResourceMemberlistProvider::try_from_config(&config.worker).await {
Ok(memberlist) => memberlist,
Err(err) => {
println!("Failed to create memberlist component: {:?}", err);
return;
}
};

let mut worker_server = match server::WorkerServer::try_from_config(&config.worker).await {
Ok(worker_server) => worker_server,
Err(err) => {
println!("Failed to create worker server component: {:?}", err);
return;
}
};

// Boot the system
// memberlist -> (This is broken for now until we have compaction manager) NUM_THREADS x segment_ingestor -> segment_manager
// server <- segment_manager

// memberlist.subscribe(recv);
let mut memberlist_handle = system.start_component(memberlist);

let server_join_handle = tokio::spawn(async move {
crate::server::WorkerServer::run(worker_server).await;
});

// Join on all handles
let _ = tokio::join!(memberlist_handle.join(), server_join_handle,);
}

0 comments on commit d8c1055

Please sign in to comment.