Class ArchiveStatusCleanupTask

All Implemented Interfaces:
Runnable

public class ArchiveStatusCleanupTask extends LeaderTask
Leader task that find jobs whose archival status was left in 'PENDING' state. This can for example happen if the agent fails to update the server after successfully archiving. The logic is summarized as: If a job finished running more than N minutes ago, and the agent is disconnected and the archive status is PENDING, then set the archive status to UNKNOWN.
Since:
4.0.0
  • Constructor Details

    • ArchiveStatusCleanupTask

      public ArchiveStatusCleanupTask(DataServices dataServices, AgentRoutingService agentRoutingService, ArchiveStatusCleanupProperties properties, io.micrometer.core.instrument.MeterRegistry registry)
      Constructor.
      Parameters:
      dataServices - data services
      agentRoutingService - agent routing service
      properties - task properties
      registry - metrics registry
  • Method Details

    • run

      public void run()
    • getScheduleType

      public GenieTaskScheduleType getScheduleType()
      Get the type of scheduling mechanism which should be used to schedule this task.
      Specified by:
      getScheduleType in class GenieTask
      Returns:
      The schedule type
    • getFixedRate

      public long getFixedRate()
      Get how long the system should wait between invoking the run() method of this task in milliseconds.
      Overrides:
      getFixedRate in class GenieTask
      Returns:
      The period to wait between invocations of run for this task