node: Preserve tracking policy on startup

We were needlessly overwriting the policy if it was set to "trusted".
This commit is contained in:
Alexis Sellier 2023-04-19 14:01:57 +02:00
parent bd04826223
commit b51d491ad9
No known key found for this signature in database
1 changed files with 7 additions and 5 deletions

View File

@ -385,11 +385,13 @@ where
for rid in self.storage.inventory()? { for rid in self.storage.inventory()? {
self.routing.insert(rid, self.node_id(), time.as_millis())?; self.routing.insert(rid, self.node_id(), time.as_millis())?;
if self if !self.is_tracking(&rid)? {
.track_repo(&rid, tracking::Scope::All) if self
.expect("Service::command: error tracking repository") .track_repo(&rid, tracking::Scope::Trusted)
{ .expect("Service::initialize: error tracking repository")
info!(target: "service", "Tracking local repository {rid}"); {
info!(target: "service", "Tracking local repository {rid}");
}
} }
} }
// Setup subscription filter for tracked repos. // Setup subscription filter for tracked repos.