Class RunRepository

java.lang.Object
ch.so.agi.gretl.control.server.persistence.RunRepository

@Repository public class RunRepository extends Object
  • Constructor Details

    • RunRepository

      public RunRepository(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, JsonSupport jsonSupport)
  • Method Details

    • insert

      public void insert(RunRecord run)
    • find

      public Optional<RunRecord> find(String id)
    • findRecent

      public List<RunRecord> findRecent(int limit)
    • findRecentForJob

      public List<RunRecord> findRecentForJob(String jobId, int limit)
    • findActive

      public List<RunRecord> findActive()
    • hasActiveRun

      public boolean hasActiveRun(String jobId)
    • findQueued

      public List<RunRecord> findQueued()
    • claim

      public boolean claim(String runId, String workerId, Instant now)
    • updateStatus

      public void updateStatus(String runId, ch.so.agi.gretl.control.api.RunStatus status, Integer exitCode, String message, Instant now)
    • requestCancel

      public void requestCancel(String runId)
    • updateQueuedMessage

      public void updateQueuedMessage(String runId, String message)
    • skipQueued

      public boolean skipQueued(String runId, String message, Instant now)
    • setLogPath

      public void setLogPath(String runId, String logPath)
    • deleteOlderThan

      public void deleteOlderThan(Instant threshold)