Skip to content

Commit 4932104

Browse files
Allow drive space check to fail without marking task as failed
1 parent 9c89969 commit 4932104

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/runner/worker.rs

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,15 @@ impl<'a, DB: WriteResults + Sync> DiskSpaceWatcher<'a, DB> {
176176
}
177177

178178
fn check(&self) -> Fallible<()> {
179-
let fs = self.current_mount()?;
179+
let fs = match self.current_mount() {
180+
Ok(fs) => fs,
181+
Err(e) => {
182+
// Enumerating system mounts fails occasionally on Windows.
183+
warn!("Failed to check space remaining: {}", e);
184+
return Ok(());
185+
}
186+
};
187+
180188
let usage = (fs.total.as_usize() - fs.free.as_usize()) as f32 / fs.total.as_usize() as f32;
181189
if usage < self.threshold {
182190
info!(

0 commit comments

Comments
 (0)