storage manager background tasks
This commit is contained in:
@@ -211,7 +211,7 @@ impl RoutingTable {
|
||||
unlocked_inner,
|
||||
};
|
||||
|
||||
this.start_tasks();
|
||||
this.setup_tasks();
|
||||
|
||||
this
|
||||
}
|
||||
@@ -262,7 +262,7 @@ impl RoutingTable {
|
||||
debug!("starting routing table terminate");
|
||||
|
||||
// Stop tasks
|
||||
self.stop_tasks().await;
|
||||
self.cancel_tasks().await;
|
||||
|
||||
// Load bucket entries from table db if possible
|
||||
debug!("saving routing table entries");
|
||||
|
@@ -9,7 +9,7 @@ pub mod rolling_transfers;
|
||||
use super::*;
|
||||
|
||||
impl RoutingTable {
|
||||
pub(crate) fn start_tasks(&self) {
|
||||
pub(crate) fn setup_tasks(&self) {
|
||||
// Set rolling transfers tick task
|
||||
{
|
||||
let this = self.clone();
|
||||
@@ -176,7 +176,7 @@ impl RoutingTable {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub(crate) async fn stop_tasks(&self) {
|
||||
pub(crate) async fn cancel_tasks(&self) {
|
||||
// Cancel all tasks being ticked
|
||||
debug!("stopping rolling transfers task");
|
||||
if let Err(e) = self.unlocked_inner.rolling_transfers_task.stop().await {
|
||||
|
Reference in New Issue
Block a user