Skip to main content

Progress

Type Alias Progress 

Source
pub type Progress = Reporter<Purge>;
Expand description

The handle a running purge reports through.

The shared runner’s Reporter, with a purge’s vocabulary put on it: a walk says found, reclaimed, failed, not “edit field 3 of the report”. Every method takes &self and writes into the job under the queue’s lock, so the console polling PurgeStatus sees a count that moves rather than a job that sits at zero for four minutes and then jumps.

Aliased Type§

pub struct Progress { /* private fields */ }

Implementations§

Source§

impl Progress

Source

pub fn found(&self, stores: u32)

How many stores the walk found. Called once, when the walk has finished counting and before it starts unlinking.

Source

pub fn reclaimed(&self, bytes: u64)

One store is gone, and this is what it was holding.

Source

pub fn failed(&self, note: String)

One store could NOT be reclaimed, and this is why.

Recorded and the walk continues. Stopping at the first failure would leave the rest of an account that is being closed on the disk because one directory had bad permissions — and the operator would have to run the purge again anyway.

Source

pub fn principal_removed(&self)

The principal itself was removed.

Source

pub fn account(&self) -> &str

The account this purge is emptying, for a runner that wants it back.