mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 15:51:12 +00:00
Remove on_connect from TelemetryConfig (#2888)
This commit is contained in:
committed by
Bastian Köcher
parent
80a4cd2b0d
commit
c4877bc05b
@@ -416,7 +416,12 @@ impl<Components: components::Components> Service<Components> {
|
||||
let telemetry = tel::init_telemetry(tel::TelemetryConfig {
|
||||
endpoints,
|
||||
wasm_external_transport: None,
|
||||
on_connect: Box::new(move || {
|
||||
});
|
||||
let future = telemetry.clone()
|
||||
.for_each(move |event| {
|
||||
// Safe-guard in case we add more events in the future.
|
||||
let tel::TelemetryEvent::Connected = event;
|
||||
|
||||
telemetry!(SUBSTRATE_INFO; "system.connected";
|
||||
"name" => name.clone(),
|
||||
"implementation" => impl_name.clone(),
|
||||
@@ -431,9 +436,9 @@ impl<Components: components::Components> Service<Components> {
|
||||
telemetry_connection_sinks_.lock().retain(|sink| {
|
||||
sink.unbounded_send(()).is_ok()
|
||||
});
|
||||
}),
|
||||
});
|
||||
task_executor.spawn(telemetry.clone()
|
||||
Ok(())
|
||||
});
|
||||
task_executor.spawn(future
|
||||
.select(exit.clone())
|
||||
.then(|_| Ok(())));
|
||||
telemetry
|
||||
|
||||
Reference in New Issue
Block a user