storage manager background tasks
This commit is contained in:
@@ -219,7 +219,7 @@ impl NetworkManager {
|
||||
)),
|
||||
};
|
||||
|
||||
this.start_tasks();
|
||||
this.setup_tasks();
|
||||
|
||||
this
|
||||
}
|
||||
@@ -379,7 +379,7 @@ impl NetworkManager {
|
||||
debug!("starting network manager shutdown");
|
||||
|
||||
// Cancel all tasks
|
||||
self.stop_tasks().await;
|
||||
self.cancel_tasks().await;
|
||||
|
||||
// Shutdown network components if they started up
|
||||
debug!("shutting down network components");
|
||||
|
||||
@@ -4,7 +4,7 @@ pub mod rolling_transfers;
|
||||
use super::*;
|
||||
|
||||
impl NetworkManager {
|
||||
pub(crate) fn start_tasks(&self) {
|
||||
pub(crate) fn setup_tasks(&self) {
|
||||
// Set rolling transfers tick task
|
||||
{
|
||||
let this = self.clone();
|
||||
@@ -67,7 +67,7 @@ impl NetworkManager {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn stop_tasks(&self) {
|
||||
pub(crate) async fn cancel_tasks(&self) {
|
||||
debug!("stopping rolling transfers task");
|
||||
if let Err(e) = self.unlocked_inner.rolling_transfers_task.stop().await {
|
||||
warn!("rolling_transfers_task not stopped: {}", e);
|
||||
|
||||
Reference in New Issue
Block a user