Be a bit more relaxed with deleting recordings
This commit is contained in:
parent
372fce2899
commit
8935dd8185
|
@ -119,12 +119,9 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
Model model = recording.getModel();
|
||||
tryRestartRecording(model);
|
||||
} else {
|
||||
if(recording.getStatus() != State.DELETED) {
|
||||
delete(recording);
|
||||
}
|
||||
setRecordingStatus(recording, State.FAILED);
|
||||
}
|
||||
} catch (InterruptedException | ExecutionException | InvalidKeyException | NoSuchAlgorithmException | IllegalStateException | IOException e) {
|
||||
} catch (InterruptedException | ExecutionException | IllegalStateException e) {
|
||||
LOG.error("Error while completing recording", e);
|
||||
}
|
||||
}
|
||||
|
@ -257,12 +254,12 @@ public class NextGenLocalRecorder implements Recorder {
|
|||
setRecordingStatus(rec, State.RECORDING);
|
||||
recordingManager.saveRecording(rec);
|
||||
download.start();
|
||||
boolean deleted = deleteIfEmpty(rec);
|
||||
setRecordingStatus(rec, deleted ? State.DELETED : State.WAITING);
|
||||
recordingManager.saveRecording(rec);
|
||||
} catch (IOException e) {
|
||||
LOG.error("Download for {} failed. Download state: {}", model.getName(), rec.getStatus(), e);
|
||||
}
|
||||
boolean deleted = deleteIfEmpty(rec);
|
||||
setRecordingStatus(rec, deleted ? State.DELETED : State.WAITING);
|
||||
recordingManager.saveRecording(rec);
|
||||
return rec;
|
||||
});
|
||||
} finally {
|
||||
|
|
Loading…
Reference in New Issue