Class JobLogWriter
java.lang.Object
com.kingsrook.qqq.backend.core.jobs.progress.JobLogWriter
One buffer/flusher per running chunk. Fencing and log pruning use an independent
short transaction. WARN/ERROR are retained even when they alone exceed the cap.
-
Constructor Summary
ConstructorsConstructorDescriptionJobLogWriter(DurableJobStore store, Integer jobId, JobLease lease, Runnable lostLease) Construct a chunk writer, or a kernel writer with no lease. -
Method Summary
Modifier and TypeMethodDescriptionvoidappend(JobLogLevel level, String phase, String message) Buffer a line.voidKernel lines can identify an interrupted attempt without its expired lease.booleanflush(JobProgressSnapshot snapshot, boolean force) Flush at most once per second, except phase changes, warnings, and chunk end.static Map<String, Serializable> progressValues(JobProgressSnapshot snapshot) Columns mirror the snapshot.static Stringredact(String message, DurableJobsMetaData settings) Apply mandatory rules and optional application rules to every displayed line.withReclaimedChunk(QRecord chunk) A reclaim reset must not overwrite a newly claimed attempt's live progress.
-
Constructor Details
-
JobLogWriter
Construct a chunk writer, or a kernel writer with no lease.
-
-
Method Details
-
withReclaimedChunk
A reclaim reset must not overwrite a newly claimed attempt's live progress. -
redact
Apply mandatory rules and optional application rules to every displayed line. -
append
Buffer a line. The caller combines log and progress in a single flush. -
append
public void append(JobLogLevel level, String phase, String message, Integer chunkId, Integer attempt) Kernel lines can identify an interrupted attempt without its expired lease. -
flush
Flush at most once per second, except phase changes, warnings, and chunk end. -
progressValues
Columns mirror the snapshot. Stored percent is an integer, rounded down.
-