Class EvalJobService

java.lang.Object
dev.dokimos.server.service.EvalJobService

@Service public class EvalJobService extends Object
Enqueues server-side judge jobs and reads the jobs registered for a run. Enqueuing transitions the run to RunStatus.EVALUATING so materialized pass-rate fields stay deferred until the worker finishes scoring.
  • Constructor Details

  • Method Details

    • enqueue

      @Transactional public EvalJobView enqueue(UUID runId, EnqueueJudgeRequest request, TenantScope scope)
      Enqueues a judge job for a run and moves the run into the evaluating state. The run row is locked for the transition so it serializes against item ingestion and completion.
      Parameters:
      runId - the run to score
      request - the connection and evaluator configuration
      Returns:
      the public view of the created job
      Throws:
      IllegalArgumentException - if the run or connection does not exist (mapped to 404)
      IllegalStateException - if the run already has a job for this evaluator (mapped to 409)
    • getJobsForRun

      @Transactional(readOnly=true) public List<EvalJobView> getJobsForRun(UUID runId, TenantScope scope)
      Lists the judge jobs registered for a run, oldest first.
      Throws:
      IllegalArgumentException - if the run does not exist (mapped to 404)