Skip to main content

Worker Module

The worker module manages background job processing and work queue security.

Configuration Options​

export interface WorkerSettingsOptions {
blacklistedVariables?: string[];
}

Blacklisting Variables​

Security Feature.

You can provide a custom list of blacklisted variables, keys which are part of the blacklist will be obfuscated with ****** in Work Queue APIs and when publishing Events.

Example custom configuration:

await startPlatform({
options: {
worker: {
blacklistedVariables: ['secret-key'],
},
},
});

If blacklistedVariables is not configured, nothing is obfuscated: buildObfuscatedFieldsFilter

Events​

EventPayloadDescription
WORK_ADDEDwork itemEmitted when work is added to the queue
WORK_ALLOCATEDwork itemEmitted when work is allocated to a worker
WORK_FINISHEDwork itemEmitted when work finishes (success or failure)
WORK_DELETEDwork itemEmitted when work is deleted
WORK_RESCHEDULED{ work, oldScheduled }Emitted when work is rescheduled

Payloads are the work item with blacklisted input variables obfuscated.

More Information​

For API usage and detailed documentation, see the core-worker package on GitHub.