Class DurableJobsMetaData
java.lang.Object
com.kingsrook.qqq.backend.core.jobs.DurableJobsMetaData
- All Implemented Interfaces:
MetaDataProducerOutput,QMetaDataObject,QSupplementalInstanceMetaData,TopLevelMetaDataInterface,Serializable
Instance-level settings for durable jobs (QInstance supplemental meta data
named "durableJobs"). Its presence turns durable jobs on: startup validation
then requires the jobs tables, a backend with CONDITIONAL_UPDATE, and every
alwaysDurable process to be eligible.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGetter for assistantAutoStartMaxRows: assistant jobs at or under this many rows start without confirmation; 0 means never.Getter for assistantMaxActiveJobs: active jobs the assistant channel may hold per user.Getter for completionEffectProviders: JobCompletionEffects providers asked for job-level effects (e.g., output delivery) when a job is about to completeGetter for defaultChunkSize: rows per chunk unless the process says otherwise.Getter for defaultMaxConcurrentJobsPerProcess: running jobs per process.Getter for durableThresholdRows: row count above which an eligible process runs as a job.Getter for effectBatchSize: effects one dispatcher pass claimsGetter for effectDispatcherThreads: dispatcher threads per pod (0 = this pod delivers no effects)The storage table uploads go to.Getter for effectLeaseTtlSeconds: how long a dispatcher holds an effect while delivering it; an expired lease means the outcome is unknownGetter for effectMaxAttempts: delivery attempts before an effect is FAILEDGetter for effectReconcileAttempts: reconcile tries for an UNKNOWN effect before it is queued for reviewGetter for effectRetryBaseSeconds: first retry delay for an effect; doubles per attempt (capped at 1 hour)Getter for effectTargets: side-effect targets by name (EffectTarget code references); the outbox delivers to theseGetter for eligibleProcessNames: processes made eligible by name, with no code.Getter for leaseTtlSeconds: how long a chunk lease lasts without a heartbeat.Getter for logMaxLinesGetter for logRedactorGetter for maxActiveJobsPerUser: running jobs per user; more stay QUEUED.Getter for maxQueuedJobsPerUser: queued jobs per user before a launch is refused (429).Getter for maxUploadBytes: the largest file POST /uploads accepts.getName()getPodId()Getter for podId: this pod's id (defaults to the host name plus a random suffix).Getter for pollIntervalMillis: how often an idle worker looks for work (jittered).Getter for queueStallMinutes: QUEUED this long raises jobs.job-stalled.Getter for reaperIntervalSeconds: how often each pod looks for expired leases.Getter for scheduledJobsUserId: the user that owns jobs launched by the scheduler when the scheduler runs as the system user.Getter for scheduledRunsAsJobs: eligible scheduled processes run as jobs.Getter for stallMinutes: RUNNING with no progress this long raises jobs.job-stalled.Getter for storageTableName: the storage table (should be object storage) for chunk inputs, error CSVs and outputs.Getter for uploadExpiryDays: days an upload ref stays usable (a job that uses it extends it).Getter for uploadsStorageTableName: the storage table POST /uploads streams files into (defaults to storageTableName).Getter for useSkipLockedClaims: claim chunks and effects with SELECT ...Getter for workerThreads: chunks this pod runs at once; 0 means this pod runs no jobs.static DurableJobsMetaDataThe settings on an instance, or null when durable jobs are off.voidsetLogMaxLines(Integer logMaxLines) Setter for logMaxLinesvoidsetLogRedactor(JobLogRedactor logRedactor) Setter for logRedactorvoidvalidate(QInstance qInstance, QInstanceValidator validator) Startup validation (spec section 4).withAssistantAutoStartMaxRows(Integer assistantAutoStartMaxRows) Fluent setter for assistantAutoStartMaxRowswithAssistantMaxActiveJobs(Integer assistantMaxActiveJobs) Fluent setter for assistantMaxActiveJobswithCompletionEffectProvider(QCodeReference codeReference) Register a JobCompletionEffects provider (job-level effects, such as delivering a job's outputs, written when a job is about to complete).withCompletionEffectProviders(List<QCodeReference> completionEffectProviders) Fluent setter for completionEffectProviderswithDefaultChunkSize(Integer defaultChunkSize) Fluent setter for defaultChunkSizewithDefaultMaxConcurrentJobsPerProcess(Integer defaultMaxConcurrentJobsPerProcess) Fluent setter for defaultMaxConcurrentJobsPerProcesswithDurableThresholdRows(Integer durableThresholdRows) Fluent setter for durableThresholdRowswithEffectBatchSize(Integer effectBatchSize) Fluent setter for effectBatchSizewithEffectDispatcherThreads(Integer effectDispatcherThreads) Fluent setter for effectDispatcherThreadswithEffectLeaseTtlSeconds(Integer effectLeaseTtlSeconds) Fluent setter for effectLeaseTtlSecondswithEffectMaxAttempts(Integer effectMaxAttempts) Fluent setter for effectMaxAttemptswithEffectReconcileAttempts(Integer effectReconcileAttempts) Fluent setter for effectReconcileAttemptswithEffectRetryBaseSeconds(Integer effectRetryBaseSeconds) Fluent setter for effectRetryBaseSecondswithEffectTarget(String name, QCodeReference codeReference) Register a side-effect target (an EffectTarget implementation) by name.withEffectTargets(Map<String, QCodeReference> effectTargets) Fluent setter for effectTargetswithEligibleProcessName(String processName) Fluent adder for one eligible process name.withEligibleProcessNames(Set<String> eligibleProcessNames) Fluent setter for eligibleProcessNameswithLeaseTtlSeconds(Integer leaseTtlSeconds) Fluent setter for leaseTtlSecondswithLogMaxLines(Integer logMaxLines) Fluent setter for logMaxLineswithLogRedactor(JobLogRedactor logRedactor) Fluent setter for logRedactorwithMaxActiveJobsPerUser(Integer maxActiveJobsPerUser) Fluent setter for maxActiveJobsPerUserwithMaxQueuedJobsPerUser(Integer maxQueuedJobsPerUser) Fluent setter for maxQueuedJobsPerUserwithMaxUploadBytes(Long maxUploadBytes) Fluent setter for maxUploadBytesFluent setter for podIdwithPollIntervalMillis(Integer pollIntervalMillis) Fluent setter for pollIntervalMilliswithQueueStallMinutes(Integer queueStallMinutes) Fluent setter for queueStallMinuteswithReaperIntervalSeconds(Integer reaperIntervalSeconds) Fluent setter for reaperIntervalSecondswithScheduledJobsUserId(String scheduledJobsUserId) Fluent setter for scheduledJobsUserIdwithScheduledRunsAsJobs(Boolean scheduledRunsAsJobs) Fluent setter for scheduledRunsAsJobswithStallMinutes(Integer stallMinutes) Fluent setter for stallMinuteswithStorageTableName(String storageTableName) Fluent setter for storageTableNamewithUploadExpiryDays(Integer uploadExpiryDays) Fluent setter for uploadExpiryDayswithUploadsStorageTableName(String uploadsStorageTableName) Fluent setter for uploadsStorageTableNamewithUseSkipLockedClaims(Boolean useSkipLockedClaims) Fluent setter for useSkipLockedClaimswithWorkerThreads(Integer workerThreads) Fluent setter for workerThreadsMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.model.metadata.QSupplementalInstanceMetaData
addSelfToInstance, enrich
-
Field Details
-
NAME
- See Also:
-
-
Constructor Details
-
DurableJobsMetaData
public DurableJobsMetaData()
-
-
Method Details
-
of
The settings on an instance, or null when durable jobs are off. -
getName
- Specified by:
getNamein interfaceTopLevelMetaDataInterface
-
withEligibleProcessName
Fluent adder for one eligible process name. -
getEffectiveUploadsStorageTableName
The storage table uploads go to. -
validate
Startup validation (spec section 4).- Specified by:
validatein interfaceQSupplementalInstanceMetaData
-
getStorageTableName
Getter for storageTableName: the storage table (should be object storage) for chunk inputs, error CSVs and outputs. -
withStorageTableName
Fluent setter for storageTableName -
getWorkerThreads
Getter for workerThreads: chunks this pod runs at once; 0 means this pod runs no jobs. -
withWorkerThreads
Fluent setter for workerThreads -
getLeaseTtlSeconds
Getter for leaseTtlSeconds: how long a chunk lease lasts without a heartbeat. -
withLeaseTtlSeconds
Fluent setter for leaseTtlSeconds -
getReaperIntervalSeconds
Getter for reaperIntervalSeconds: how often each pod looks for expired leases. -
withReaperIntervalSeconds
Fluent setter for reaperIntervalSeconds -
getPollIntervalMillis
Getter for pollIntervalMillis: how often an idle worker looks for work (jittered). -
withPollIntervalMillis
Fluent setter for pollIntervalMillis -
getDurableThresholdRows
Getter for durableThresholdRows: row count above which an eligible process runs as a job. -
withDurableThresholdRows
Fluent setter for durableThresholdRows -
getDefaultChunkSize
Getter for defaultChunkSize: rows per chunk unless the process says otherwise. -
withDefaultChunkSize
Fluent setter for defaultChunkSize -
getDefaultMaxConcurrentJobsPerProcess
Getter for defaultMaxConcurrentJobsPerProcess: running jobs per process. -
withDefaultMaxConcurrentJobsPerProcess
public DurableJobsMetaData withDefaultMaxConcurrentJobsPerProcess(Integer defaultMaxConcurrentJobsPerProcess) Fluent setter for defaultMaxConcurrentJobsPerProcess -
getMaxActiveJobsPerUser
Getter for maxActiveJobsPerUser: running jobs per user; more stay QUEUED. -
withMaxActiveJobsPerUser
Fluent setter for maxActiveJobsPerUser -
getMaxQueuedJobsPerUser
Getter for maxQueuedJobsPerUser: queued jobs per user before a launch is refused (429). -
withMaxQueuedJobsPerUser
Fluent setter for maxQueuedJobsPerUser -
getStallMinutes
Getter for stallMinutes: RUNNING with no progress this long raises jobs.job-stalled. -
withStallMinutes
Fluent setter for stallMinutes -
getQueueStallMinutes
Getter for queueStallMinutes: QUEUED this long raises jobs.job-stalled. -
withQueueStallMinutes
Fluent setter for queueStallMinutes -
getAssistantAutoStartMaxRows
Getter for assistantAutoStartMaxRows: assistant jobs at or under this many rows start without confirmation; 0 means never. -
withAssistantAutoStartMaxRows
Fluent setter for assistantAutoStartMaxRows -
getAssistantMaxActiveJobs
Getter for assistantMaxActiveJobs: active jobs the assistant channel may hold per user. -
withAssistantMaxActiveJobs
Fluent setter for assistantMaxActiveJobs -
getScheduledRunsAsJobs
Getter for scheduledRunsAsJobs: eligible scheduled processes run as jobs. -
withScheduledRunsAsJobs
Fluent setter for scheduledRunsAsJobs -
getScheduledJobsUserId
Getter for scheduledJobsUserId: the user that owns jobs launched by the scheduler when the scheduler runs as the system user. The app's authentication module must be able to create an automated session for it. Without it, such scheduled runs stay inline (as before durable jobs). -
withScheduledJobsUserId
Fluent setter for scheduledJobsUserId -
getEligibleProcessNames
-
withEligibleProcessNames
Fluent setter for eligibleProcessNames -
getPodId
Getter for podId: this pod's id (defaults to the host name plus a random suffix). -
withPodId
Fluent setter for podId -
getUploadsStorageTableName
Getter for uploadsStorageTableName: the storage table POST /uploads streams files into (defaults to storageTableName). -
withUploadsStorageTableName
Fluent setter for uploadsStorageTableName -
getUploadExpiryDays
Getter for uploadExpiryDays: days an upload ref stays usable (a job that uses it extends it). -
withUploadExpiryDays
Fluent setter for uploadExpiryDays -
getMaxUploadBytes
Getter for maxUploadBytes: the largest file POST /uploads accepts. -
withMaxUploadBytes
Fluent setter for maxUploadBytes -
getEffectTargets
Getter for effectTargets: side-effect targets by name (EffectTarget code references); the outbox delivers to these -
withEffectTargets
Fluent setter for effectTargets -
getEffectMaxAttempts
Getter for effectMaxAttempts: delivery attempts before an effect is FAILED -
withEffectMaxAttempts
Fluent setter for effectMaxAttempts -
getEffectReconcileAttempts
Getter for effectReconcileAttempts: reconcile tries for an UNKNOWN effect before it is queued for review -
withEffectReconcileAttempts
Fluent setter for effectReconcileAttempts -
getEffectLeaseTtlSeconds
Getter for effectLeaseTtlSeconds: how long a dispatcher holds an effect while delivering it; an expired lease means the outcome is unknown -
withEffectLeaseTtlSeconds
Fluent setter for effectLeaseTtlSeconds -
getEffectRetryBaseSeconds
Getter for effectRetryBaseSeconds: first retry delay for an effect; doubles per attempt (capped at 1 hour) -
withEffectRetryBaseSeconds
Fluent setter for effectRetryBaseSeconds -
getEffectBatchSize
Getter for effectBatchSize: effects one dispatcher pass claims -
withEffectBatchSize
Fluent setter for effectBatchSize -
getEffectDispatcherThreads
Getter for effectDispatcherThreads: dispatcher threads per pod (0 = this pod delivers no effects) -
withEffectDispatcherThreads
Fluent setter for effectDispatcherThreads -
getUseSkipLockedClaims
Getter for useSkipLockedClaims: claim chunks and effects with SELECT ... FOR UPDATE SKIP LOCKED where the backend supports it (else conditional updates) -
withUseSkipLockedClaims
Fluent setter for useSkipLockedClaims -
withEffectTarget
Register a side-effect target (an EffectTarget implementation) by name. -
getCompletionEffectProviders
Getter for completionEffectProviders: JobCompletionEffects providers asked for job-level effects (e.g., output delivery) when a job is about to complete -
withCompletionEffectProviders
public DurableJobsMetaData withCompletionEffectProviders(List<QCodeReference> completionEffectProviders) Fluent setter for completionEffectProviders -
withCompletionEffectProvider
Register a JobCompletionEffects provider (job-level effects, such as delivering a job's outputs, written when a job is about to complete). -
getLogMaxLines
Getter for logMaxLines -
setLogMaxLines
Setter for logMaxLines -
withLogMaxLines
Fluent setter for logMaxLines -
getLogRedactor
Getter for logRedactor -
setLogRedactor
Setter for logRedactor -
withLogRedactor
Fluent setter for logRedactor
-