View Source Oban.Peers.Postgres (Oban v2.14.1)

A Postgres based peer that coordinates centrally through a database table.

Postgres peers don't require clustering through distributed Erlang or any other interconnectivity between nodes. Leadership is coordinated through the oban_peers table in your database. With a standard Oban config the oban_peers table will only have one row, and that node is the leader.

Applications that run multiple Oban instances will have one row per instance. For example, an umbrella application that runs Oban.A and Oban.B will have two rows in oban_peers.

usage

Usage

Specify the Postgres peer in your Oban configuration.

config :my_app, Oban,
  peer: Oban.Peers.Postgres,
  ...

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.