forked from j62/ctbrec
1
0
Fork 0

Move recorder lock inside of startRecordingProcess

... to make the period of the lock mich shorter
This commit is contained in:
0xb00bface 2021-09-02 11:42:52 +02:00
parent e05c9657e4
commit 78f7f7a841
1 changed files with 1 additions and 1 deletions

View File

@ -291,11 +291,11 @@ public class NextGenLocalRecorder implements Recorder {
private CompletableFuture<Void> startRecordingProcess(Model model) {
return CompletableFuture.runAsync(() -> {
recorderLock.lock();
try {
preconditions.check(model, config);
LOG.info("Starting recording for model {}", model.getName());
Download download = createDownload(model);
recorderLock.lock();
Recording rec = createRecording(download);
setRecordingStatus(rec, State.RECORDING);
rec.getModel().setLastRecorded(rec.getStartDate());