Class JobSignals

java.lang.Object
com.kingsrook.qqq.backend.core.jobs.runtime.JobSignals

public final class JobSignals extends Object
Everything a job tells the outside world: realtime events (job.status on every change, job.progress throttled to one per second per job - counts only, never row values), alerts (jobs.job-failed, jobs.job-stalled) and the owner's completion notification. All best effort: a signal failure never fails a job. Core never depends on qbit-alerts; QAlerts routes to whatever sink the app installed.
  • Field Details

  • Method Details

    • status

      public static void status(Integer jobId, String userId, JobStatus status)
      Publish job.status to the job's record channel and the owner's user channel.
    • progress

      public static void progress(QRecord job, boolean force)
      Publish job.progress (at most once per second per job unless forced).
    • finished

      public static void finished(QRecord job, JobStatus status)
      A job reached a final (or review) status: notify its owner, raise or resolve the failure alert, publish status.
    • stalled

      public static void stalled(QRecord job, String why)
      Raise the stalled alert for a job.
    • effectUnresolved

      public static void effectUnresolved(QRecord effect)
      Raise the alert for an outbox effect whose delivery could not be determined and that is queued for review (deduped per effect).
    • effectResolved

      public static void effectResolved(Integer effectId, String how)
      Resolve an effect's review alert.
    • unstalled

      public static void unstalled(Integer jobId)
      Resolve the stalled alert for a job (it moved again).