mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-18 03:41:02 +00:00
Update Substrate/Polkadot/Cumulus references (#1353)
* cumulus: 4e95228291
polkadot: 975e780ae0d988dc033f400ba822d14b326ee5b9
substrate: 89fcb3e4f62d221d4e161a437768e77d6265889e
* fix refs
* sync changes from https://github.com/paritytech/polkadot/pull/3828
* sync changes from https://github.com/paritytech/polkadot/pull/4387
* sync changes from https://github.com/paritytech/polkadot/pull/3940
* sync with changes from https://github.com/paritytech/polkadot/pull/4493
* sync with changes from https://github.com/paritytech/polkadot/pull/4958
* sync with changes from https://github.com/paritytech/polkadot/pull/3889
* sync with changes from https://github.com/paritytech/polkadot/pull/5033
* sync with changes from https://github.com/paritytech/polkadot/pull/5065
* compilation fixes
* fixed prometheus endpoint startup (it now requires to be spawned within tokio context)
This commit is contained in:
committed by
Bastian Köcher
parent
ed2a3082ef
commit
65c2c0ccce
@@ -187,12 +187,32 @@ impl<SC, TC, LM> LoopMetrics<SC, TC, LM> {
|
||||
|
||||
let registry = self.registry;
|
||||
async_std::task::spawn(async move {
|
||||
let result = init_prometheus(socket_addr, registry).await;
|
||||
log::trace!(
|
||||
target: "bridge-metrics",
|
||||
"Prometheus endpoint has exited with result: {:?}",
|
||||
result,
|
||||
);
|
||||
let runtime =
|
||||
match tokio::runtime::Builder::new_current_thread().enable_all().build() {
|
||||
Ok(runtime) => runtime,
|
||||
Err(err) => {
|
||||
log::trace!(
|
||||
target: "bridge-metrics",
|
||||
"Failed to create tokio runtime. Prometheus meterics are not available: {:?}",
|
||||
err,
|
||||
);
|
||||
return
|
||||
},
|
||||
};
|
||||
|
||||
let _ = runtime.block_on(async move {
|
||||
log::trace!(
|
||||
target: "bridge-metrics",
|
||||
"Starting prometheus endpoint at: {:?}",
|
||||
socket_addr,
|
||||
);
|
||||
let result = init_prometheus(socket_addr, registry).await;
|
||||
log::trace!(
|
||||
target: "bridge-metrics",
|
||||
"Prometheus endpoint has exited with result: {:?}",
|
||||
result,
|
||||
);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user