mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-27 15:07:59 +00:00
Add group name in task metrics (#10196)
* SpawnNamed: add new trait methods Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com> * Implement new methods Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com> * cargo fmt Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com> * SpawnNamed: add new trait methods Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com> * Implement new methods Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com> * cargo fmt Signed-off-by: Andrei Sandu <sandu.andrei@gmail.com> * New approach - spaw() group param Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Update traits: SpawnNamed and SpawnNamed Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Update TaskManager tests Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Update test TaskExecutor Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Fix typo Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * grunt work: fix spawn() calls Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * cargo fmt Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * remove old code Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * cargo fmt - the right version Signed-off-by: Andrei Sandu <andrei-mihail@parity.io> * Implement review feedback - use Option group name in SpawnNamed methods - switch to kebab case - implement default group name - add group name to some tasks Signed-off-by: Andrei Sandu <andrei-mihail@parity.io>
This commit is contained in:
@@ -74,6 +74,7 @@ impl BatchVerifier {
|
||||
|
||||
self.scheduler.spawn(
|
||||
name,
|
||||
None,
|
||||
async move {
|
||||
if !f() {
|
||||
invalid_clone.store(true, AtomicOrdering::Relaxed);
|
||||
@@ -177,7 +178,8 @@ impl BatchVerifier {
|
||||
if pending.len() > 0 {
|
||||
let (sender, receiver) = std::sync::mpsc::channel();
|
||||
self.scheduler.spawn(
|
||||
"substrate_batch_verify_join",
|
||||
"substrate-batch-verify-join",
|
||||
None,
|
||||
async move {
|
||||
futures::future::join_all(pending).await;
|
||||
sender.send(()).expect(
|
||||
|
||||
Reference in New Issue
Block a user