ADD error handling

This commit is contained in:
2025-05-12 21:57:31 +02:00
parent 489372ea61
commit 25dd60dd82
3 changed files with 14 additions and 5 deletions

View File

@@ -2,6 +2,7 @@ package com.ddf.vodsystem.services;
import com.ddf.vodsystem.entities.ClipConfig;
import com.ddf.vodsystem.entities.Job;
import com.ddf.vodsystem.entities.JobStatus;
import com.ddf.vodsystem.exceptions.JobNotFound;
import org.springframework.stereotype.Service;
@@ -36,6 +37,10 @@ public class EditService {
throw new JobNotFound(uuid);
}
if (job.getStatus() == JobStatus.FINISHED) {
return 1f;
}
return job.getProgress();
}
}