RemoteTaskRunner: Only cleanup paths during bootstrapping if task is complete

This commit is contained in:
Gian Merlino 2013-01-25 16:01:17 -08:00
parent efdff7b9f1
commit 1cff766e2a
1 changed files with 4 additions and 1 deletions

View File

@ -316,7 +316,10 @@ public class RemoteTaskRunner implements TaskRunner
if (callback != null) {
callback.notify(taskStatus);
}
new CleanupPaths(worker.getHost(), taskWrapper.getTask().getId()).run();
if (taskStatus.isComplete()) {
new CleanupPaths(worker.getHost(), taskWrapper.getTask().getId()).run();
}
} else {
log.warn("Worker data was null for worker: %s", worker.getHost());
}