StateAdapterConfig
TypeSignature
type StateAdapterConfig<TJobId, TWorkerId> = {
countCap: number;
generateJobId: () => TJobId;
generateWorkerId: () => TWorkerId;
maxBlockersPerJob: number;
validateJobId: (id) => boolean;
validateWorkerId: (id) => boolean;
};core/src/state-adapter/state-adapter.ts:127
A state adapter's resolved configuration, with defaults applied.
Type Parameters
- TJobIdextends
stringThe job ID type - TWorkerIdextends
stringThe worker ID type
Properties
- countCap
numberPer-status count at which
countChainsByTypeNameandcountJobsByTypeNamestop counting and reporthasMore.
generateJobId
Signature
generateJobId: () => TJobId;core/src/state-adapter/state-adapter.ts:129
Generates a job ID.
Returns
TJobId
generateWorkerId
Signature
generateWorkerId: () => TWorkerId;core/src/state-adapter/state-adapter.ts:133
Generates a new worker ID on every call.
Returns
TWorkerId
- maxBlockersPerJob
numberMaximum number of blocker chains per job.
validateJobId
Signature
validateJobId: (id) => boolean;core/src/state-adapter/state-adapter.ts:131
Checks a job ID.
Parameters
- id
TJobId
Returns
boolean
validateWorkerId
Signature
validateWorkerId: (id) => boolean;core/src/state-adapter/state-adapter.ts:135
Checks a worker ID.
Parameters
- id
TWorkerId
Returns
boolean