ADD status endpoint

This commit is contained in:
2025-05-11 22:47:20 +02:00
parent 8545526218
commit 489372ea61
3 changed files with 25 additions and 1 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.exceptions.JobNotFound;
import org.springframework.stereotype.Service;
@Service
@@ -27,4 +28,14 @@ public class EditService {
public void jobReady(String uuid) {
jobService.jobReady(uuid);
}
public float getProgress(String uuid) {
Job job = jobService.get(uuid);
if (job == null) {
throw new JobNotFound(uuid);
}
return job.getProgress();
}
}