API Reference Oban v2.12.1



Oban is a robust job processing library which uses PostgreSQL for storage and coordination.

The Config struct validates and encapsulates Oban instance state.

Wraps unhandled exits and throws that occur during job execution.

A Job is an Ecto schema used for asynchronous execution.

Migrations create and modify the database tables Oban needs to function.

The Notifier coordinates listening for and publishing notifications for events in predefined channels.

A PG/PG2 based notifier implementation that runs with Distributed Erlang.

A Postgres Listen/Notify based Notifier.

The Peer module maintains leadership for a particular Oban instance within a cluster.

A cluster based peer that coordinates through a distributed registry.

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

Wraps the reason returned by {:error, reason}, {:discard, reason} in a proper exception.

Defines a shared behaviour for Oban plugins.

Periodically enqueue jobs through CRON based scheduling.

The Gossip plugin uses PubSub to periodically exchange queue state information between all interested nodes. This allows Oban instances to broadcast state information regardless of which engine they are using, and without storing anything in the database.

Naively transition jobs stuck executing back to available.

Periodically delete completed, cancelled and discarded jobs based on age.

Periodically rebuild indexes to minimize database bloat.

Repeatedly send inserted messages to all registered producers to simulate polling.

Transition jobs to the available state when they reach their scheduled time.

Local process storage for Oban instances.

Wrappers around Ecto.Repo callbacks.

Telemetry integration for event metrics, logging and error reporting.

This module simplifies testing workers and making assertions about enqueued jobs when testing in :manual mode.

Returned when a job is terminated early due to a custom timeout.

Defines a behavior and macro to guide the creation of worker modules.