Skip to main content

Interface: WorkerInterceptors

worker.WorkerInterceptors

Structure for passing in Worker interceptors via WorkerOptions

Properties

activity

Optional activity: ActivityInterceptorsFactory[]

List of factory functions that instanciate ActivityInboundCallsInterceptors and ActivityOutboundCallsInterceptors.


activityInbound

Optional activityInbound: ActivityInboundCallsInterceptorFactory[]

List of factory functions returning ActivityInboundCallsInterceptors. If both activity and activityInbound is supplied, then entries from activityInbound will be prepended to inbound interceptors instanciated from activity.

Deprecated

Use WorkerInterceptors.activity instead.


workflowModules

Optional workflowModules: string[]

List of modules to search for Workflow interceptors in

  • Modules should export an interceptors variable of type WorkflowInterceptorsFactory
  • Workflow interceptors run in the Workflow isolate

NOTE: This option is not used if Worker is provided with pre-built bundle (WorkerOptions.workflowBundle).