mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-30 22:27:56 +00:00
Improve storage monitor API (#2899)
This removes the need to unnecessarily provide a very specific data structure `DatabaseSource` and removes huge `sc-client-db` dependency from storage monitor. It is now possible to use storage monitor with any path. P.S. I still strongly dislike that it pulls `clap` dependency for such a small feature, but many other crates do as well, so nothing special here.
This commit is contained in:
@@ -256,11 +256,13 @@ where
|
||||
)
|
||||
.map(|full| full.task_manager)?;
|
||||
|
||||
sc_storage_monitor::StorageMonitorService::try_spawn(
|
||||
cli.storage_monitor,
|
||||
database_source,
|
||||
&task_manager.spawn_essential_handle(),
|
||||
)?;
|
||||
if let Some(path) = database_source.path() {
|
||||
sc_storage_monitor::StorageMonitorService::try_spawn(
|
||||
cli.storage_monitor,
|
||||
path.to_path_buf(),
|
||||
&task_manager.spawn_essential_handle(),
|
||||
)?;
|
||||
}
|
||||
|
||||
Ok(task_manager)
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user