refactor: remove service_name (#8606)

Which issue # does this PR address?
#8586


  Please list or describe the changes introduced by this PR.
Remove `service_name` from `TaskExecutor`


Co-Authored-By: Abhivansh <31abhivanshj@gmail.com>
This commit is contained in:
Abhivansh
2026-01-02 05:37:40 +05:30
committed by GitHub
parent 6dab3c9a61
commit 9b3d7e3a54
12 changed files with 26 additions and 134 deletions

View File

@@ -83,11 +83,6 @@ pub struct TaskExecutor {
/// The task must provide a reason for shutting down.
signal_tx: Sender<ShutdownReason>,
/// The name of the service for inclusion in the logger output.
// FIXME(sproul): delete?
#[allow(dead_code)]
service_name: String,
rayon_pool_provider: Arc<RayonPoolProvider>,
}
@@ -103,28 +98,15 @@ impl TaskExecutor {
handle: T,
exit: async_channel::Receiver<()>,
signal_tx: Sender<ShutdownReason>,
service_name: String,
) -> Self {
Self {
handle_provider: handle.into(),
exit,
signal_tx,
service_name,
rayon_pool_provider: Arc::new(RayonPoolProvider::default()),
}
}
/// Clones the task executor adding a service name.
pub fn clone_with_name(&self, service_name: String) -> Self {
TaskExecutor {
handle_provider: self.handle_provider.clone(),
exit: self.exit.clone(),
signal_tx: self.signal_tx.clone(),
service_name,
rayon_pool_provider: self.rayon_pool_provider.clone(),
}
}
/// A convenience wrapper for `Self::spawn` which ignores a `Result` as long as both `Ok`/`Err`
/// are of type `()`.
///

View File

@@ -37,7 +37,7 @@ impl Default for TestRuntime {
(Some(runtime), handle)
};
let task_executor = TaskExecutor::new(handle, exit, shutdown_tx, "test".to_string());
let task_executor = TaskExecutor::new(handle, exit, shutdown_tx);
Self {
runtime,