Kaizen
Browse modulesLifecyclelifecycle/serverInterfaces

Interface: DrainOptions

Defined in: server/lifecycle/dispatcher.ts:22

Properties

actorId?

optional actorId?: string;

Defined in: server/lifecycle/dispatcher.ts:33

Actor ID for audit fields on the repo writes.


batchSize?

optional batchSize?: number;

Defined in: server/lifecycle/dispatcher.ts:27

Max rows to process in one drain call. Default 50.


claimedBy?

optional claimedBy?: string;

Defined in: server/lifecycle/dispatcher.ts:25

Worker identity stamped on claimed rows. Default: "lifecycle-drain".


handler

handler: EffectHandler;

Defined in: server/lifecycle/dispatcher.ts:23


leaseMs?

optional leaseMs?: number;

Defined in: server/lifecycle/dispatcher.ts:29

Lease duration (ms) for a claimed row. Default 30_000.


logger?

optional logger?: Pick<Logger, "error">;

Defined in: server/lifecycle/dispatcher.ts:41

Diagnostic sink for isolated bookkeeping failures. Defaults to console.


maxAttempts?

optional maxAttempts?: number;

Defined in: server/lifecycle/dispatcher.ts:31

Attempts before a row is dead-lettered. Default 5.


tenancy?

optional tenancy?: LifecycleTenancyConfig;

Defined in: server/lifecycle/dispatcher.ts:39

Enable ambient tenant-bound draining. Omit to drain global effects only. This must match the producing engine's mode or the worker sees a different namespace and can appear idle while effects remain pending.

On this page