Tasks Configuration
enableWorker: Whether to enable Worker (default: true only in daemon mode)workerOptions.concurrency: Number of concurrent tasks (default: CPU cores - 1)workerOptions.usePubSub: Use PostgreSQL LISTEN/NOTIFY (default: true)workerOptions.listenDelay: Wait time after receiving Pub/Sub message (default: 500ms)contextProvider: Function to create Context used within Workflows
WorkflowManager
Sonamu automatically creates and manages theWorkflowManager. Access it via Sonamu.workflows.
Worker Modes
1. Daemon Mode (Auto-enabled)
enableWorker: true is the default.
2. Separate Worker Process
3. API Server + Worker
Distributed Workers
You can run Workers on multiple servers.Context Provider
Customize the Context used in Workflows.Sonamu.getContext() within a Workflow function: