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();
|
Model model = recording.getModel();
|
||||||
tryRestartRecording(model);
|
tryRestartRecording(model);
|
||||||
} else {
|
} else {
|
||||||
if(recording.getStatus() != State.DELETED) {
|
|
||||||
delete(recording);
|
|
||||||
}
|
|
||||||
setRecordingStatus(recording, State.FAILED);
|
setRecordingStatus(recording, State.FAILED);
|
||||||
}
|
}
|
||||||
} catch (InterruptedException | ExecutionException | InvalidKeyException | NoSuchAlgorithmException | IllegalStateException | IOException e) {
|
} catch (InterruptedException | ExecutionException | IllegalStateException e) {
|
||||||
LOG.error("Error while completing recording", e);
|
LOG.error("Error while completing recording", e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -257,12 +254,12 @@ public class NextGenLocalRecorder implements Recorder {
|
||||||
setRecordingStatus(rec, State.RECORDING);
|
setRecordingStatus(rec, State.RECORDING);
|
||||||
recordingManager.saveRecording(rec);
|
recordingManager.saveRecording(rec);
|
||||||
download.start();
|
download.start();
|
||||||
boolean deleted = deleteIfEmpty(rec);
|
|
||||||
setRecordingStatus(rec, deleted ? State.DELETED : State.WAITING);
|
|
||||||
recordingManager.saveRecording(rec);
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
LOG.error("Download for {} failed. Download state: {}", model.getName(), rec.getStatus(), 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;
|
return rec;
|
||||||
});
|
});
|
||||||
} finally {
|
} finally {
|
||||||
|
|
Loading…
Reference in New Issue