Name PubSubService tokio threads (#35331)

Also add logs for service starting/stopping
This commit is contained in:
steviez 2024-02-27 14:59:07 -06:00 committed by GitHub
parent 8be9930c98
commit 94698b8dd0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 4 additions and 1 deletions

View File

@ -91,7 +91,9 @@ impl PubSubService {
let thread_hdl = Builder::new()
.name("solRpcPubSub".to_string())
.spawn(move || {
info!("PubSubService has started");
let runtime = tokio::runtime::Builder::new_multi_thread()
.thread_name("solRpcPubSubRt")
.worker_threads(pubsub_config.worker_threads)
.enable_all()
.build()
@ -102,8 +104,9 @@ impl PubSubService {
subscription_control,
tripwire,
)) {
error!("pubsub service failed: {}", err);
error!("PubSubService has stopped due to error: {err}");
};
info!("PubSubService has stopped");
})
.expect("thread spawn failed");