BullMQ.Backends.Postgres.Connection (BullMQ v2.0.2)
View SourceOwns the PostgreSQL connection resources for the BullMQ Postgres backend,
mirroring BullMQ.RedisConnection:
- a
Postgrexconnection pool for regular queries (each pooled connection pins itssearch_pathto the configured schema, so the portable.sqlfiles reference unqualified names), and - a dedicated
Postgrex.Notificationsprocess used by the blocking "wait for job" / event-stream primitives (LISTEN/NOTIFY).
Schema migrations are run exactly once at startup on the pool, guarded by a transaction-scoped advisory lock.
Options
:name(required) — name to register the connection under.:url— apostgres://…connection string, or:hostname/:port/:database/:username/:password— discrete opts.:schema— the namespace for all queues (default"bullmq").:pool_size— pool size (default10).:skip_version_check— bypass the minimum-server-version assertion.:skip_migrations— do not run migrations (assume already applied).
Summary
Functions
Returns a specification to start this module under a supervisor.
Closes the connection pool and notifications.
Returns the connection context (%{pool, notifications, schema}) for name.
The Postgrex.Notifications reference for name.
The Postgrex pool reference for name.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec close(atom()) :: :ok
Closes the connection pool and notifications.
Returns the connection context (%{pool, notifications, schema}) for name.
The Postgrex.Notifications reference for name.
The Postgrex pool reference for name.
@spec start_link(keyword()) :: Supervisor.on_start()