mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-12 13:31:10 +00:00
skip passed slots and wake up service correctly (#4212)
This commit is contained in:
committed by
Gavin Wood
parent
5010faa9bd
commit
52b5dee4f9
@@ -49,7 +49,7 @@ use sr_primitives::traits::{
|
||||
use substrate_executor::{NativeExecutor, NativeExecutionDispatch};
|
||||
use std::{
|
||||
io::{Read, Write, Seek},
|
||||
marker::PhantomData, sync::Arc, sync::atomic::AtomicBool, time::SystemTime
|
||||
marker::PhantomData, sync::Arc, time::SystemTime
|
||||
};
|
||||
use sysinfo::{get_current_pid, ProcessExt, System, SystemExt};
|
||||
use tel::{telemetry, SUBSTRATE_INFO};
|
||||
@@ -823,6 +823,9 @@ ServiceBuilder<
|
||||
let (to_spawn_tx, to_spawn_rx) =
|
||||
mpsc::unbounded::<Box<dyn Future<Item = (), Error = ()> + Send>>();
|
||||
|
||||
// A side-channel for essential tasks to communicate shutdown.
|
||||
let (essential_failed_tx, essential_failed_rx) = mpsc::unbounded();
|
||||
|
||||
let import_queue = Box::new(import_queue);
|
||||
let chain_info = client.info().chain;
|
||||
|
||||
@@ -1163,7 +1166,7 @@ ServiceBuilder<
|
||||
|
||||
let _ = to_spawn_tx.unbounded_send(Box::new(future));
|
||||
}
|
||||
|
||||
|
||||
// Instrumentation
|
||||
if let Some(tracing_targets) = config.tracing_targets.as_ref() {
|
||||
let subscriber = substrate_tracing::ProfilingSubscriber::new(
|
||||
@@ -1183,7 +1186,8 @@ ServiceBuilder<
|
||||
transaction_pool,
|
||||
exit,
|
||||
signal: Some(signal),
|
||||
essential_failed: Arc::new(AtomicBool::new(false)),
|
||||
essential_failed_tx,
|
||||
essential_failed_rx,
|
||||
to_spawn_tx,
|
||||
to_spawn_rx,
|
||||
to_poll: Vec::new(),
|
||||
|
||||
Reference in New Issue
Block a user