Binds queue constructors to a backend without changing the process-wide default. Connection options are required and checked against the factory.
const { Queue, Worker } = withBackend(createPostgresBackend);const queue = new Queue<{ value: number }>('tasks', { connection: 'postgres://localhost/mydb',}); Copy
const { Queue, Worker } = withBackend(createPostgresBackend);const queue = new Queue<{ value: number }>('tasks', { connection: 'postgres://localhost/mydb',});
Binds queue constructors to a backend without changing the process-wide default. Connection options are required and checked against the factory.