pub struct PullStatus {
pub state: PullState,
pub progress: InstallProgress,
pub status_line: Option<String>,
pub attempt: u32,
pub next_attempt_at_ms: Option<i64>,
pub message: Option<String>,
pub pid: Option<u32>,
pub updated_at_ms: i64,
}Expand description
A pull’s live record, rewritten as the transfer moves.
Fields§
§state: PullStateWhere the pull is.
progress: InstallProgressHow much has transferred.
status_line: Option<String>The provider’s last human-readable line.
attempt: u32Which attempt is running; 0 until the first transfer starts.
next_attempt_at_ms: Option<i64>When the next retry is due, epoch milliseconds, while one is waiting.
message: Option<String>Why the job ended, or why it is waiting to retry.
pid: Option<u32>The worker’s process id, for display only. Liveness comes from the lock.
updated_at_ms: i64When this record was last written, epoch milliseconds.
Implementations§
Source§impl PullStatus
impl PullStatus
Sourcepub fn past_stopping(&self) -> bool
pub fn past_stopping(&self) -> bool
Whether this pull has gone past the point an ask can stop it: a running worker that has said it is registering what it fetched, and so will read no control file until it is done.
The byte count is deliberately not the signal. Bytes reaching the total says the transfer is over, not that nothing is listening: the worker polls the control file until the install reports itself done, and an ask in that window is read and can still take effect. It is also a figure the record can be wrong about, being carried over from a previous attempt or summed from a listing that left a file’s size out, and a wrong full bar would make a pull unstoppable for the rest of its life.