Class InlineJobTracker
java.lang.Object
com.kingsrook.qqq.backend.core.jobs.runtime.InlineJobTracker
Per-pod mirrors of already-running inline processes. These have no chunks and
cannot survive loss of the process's pod.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInlineJobTracker(DurableJobStore store, String podId) Construct the tracker owned by the runtime. -
Method Summary
Modifier and TypeMethodDescriptionvoidfinishTracked(Integer jobId, JobStatus terminal, String message) Finalize a tracking job (first terminal status wins).voidRecord that a tracking job is alive.voidRegister the listener fired (once, on this pod) when the job is cancelled.voidreap()Fail inline jobs whose worker heartbeat has disappeared.Start a fresh inline run with the captured process values.startTracked(String processName, String label, String owner, String clientChannel, String tableName, Serializable recordId) Start a tracking job that no process backs (see JobTracking): RUNNING, owned by this pod, failed by the reaper if this pod goes away.voidtick()Mirror each active process once per runtime tick.Validate process ownership before creating or returning a tracking job.
-
Field Details
-
RESTART_MESSAGE
- See Also:
-
-
Constructor Details
-
InlineJobTracker
Construct the tracker owned by the runtime.
-
-
Method Details
-
track
Validate process ownership before creating or returning a tracking job.- Throws:
QException
-
runAgain
Start a fresh inline run with the captured process values. Fast completion is valid here: the tracking row is immediately finalized in that case.- Throws:
QException
-
startTracked
public Integer startTracked(String processName, String label, String owner, String clientChannel, String tableName, Serializable recordId) throws QException Start a tracking job that no process backs (see JobTracking): RUNNING, owned by this pod, failed by the reaper if this pod goes away.- Throws:
QException
-
onCancel
-
heartbeat
Record that a tracking job is alive.- Throws:
QException
-
finishTracked
Finalize a tracking job (first terminal status wins).- Throws:
QException
-
tick
public void tick()Mirror each active process once per runtime tick. -
reap
Fail inline jobs whose worker heartbeat has disappeared.- Throws:
QException
-