Skip to content

Commit d56b983

Browse files
Add cache purge if we're out of disk space
1 parent 98133a1 commit d56b983

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/runner/worker.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,15 @@ impl<'a> Worker<'a> {
196196
Ok(()) => break,
197197
Err(e) => {
198198
if logs.to_string().contains("No space left on device") {
199+
if attempt == 3 {
200+
// FIXME: Doesn't this cause us to potentially delete caches
201+
// used by other workers? Maybe we can do something more
202+
// intelligent here?
203+
if let Err(e) = self.workspace.purge_all_caches() {
204+
log::warn!("purging caches failed: {:?}", e);
205+
}
206+
}
207+
199208
if attempt == 15 {
200209
// If we've failed 15 times, then
201210
// just give up. It's been at least

0 commit comments

Comments
 (0)