Oban
▼
Project version
v2.19.4
v2.19.3
v2.19.2
v2.19.1
v2.19.0
v2.18.3
v2.18.2
v2.18.1
v2.18.0
v2.17.12
v2.17.11
v2.17.10
v2.17.9
v2.17.8
v2.17.7
v2.17.6
v2.17.5
v2.17.4
v2.17.3
v2.17.2
v2.17.1
v2.17.0
v2.16.3
v2.16.2
v2.16.1
v2.16.0
v2.15.4
v2.15.3
v2.15.2
v2.15.1
v2.15.0
v2.14.2
v2.14.1
v2.14.0
v2.13.6
v2.13.5
v2.13.4
v2.13.3
v2.13.2
v2.13.1
v2.13.0
v2.12.1
v2.12.0
v2.11.3
v2.11.2
v2.11.1
v2.11.0
v2.10.1
v2.10.0
v2.9.2
v2.9.1
v2.9.0
v2.8.0
v2.7.2
v2.7.1
v2.7.0
v2.6.1
v2.6.0
v2.5.0
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.4
v2.3.3
v2.3.2
v2.3.1
v2.2.0
v2.1.0
v2.0.0
v2.0.0-rc.3
v2.0.0-rc.2
v2.0.0-rc.1
v2.0.0-rc.0
v1.2.0
v1.1.0
v1.0.0
v1.0.0-rc.2
v1.0.0-rc.1
v0.12.1
v0.12.0
v0.11.1
v0.11.0
v0.10.1
v0.10.0
v0.9.0
v0.8.1
v0.8.0
v0.7.1
v0.7.0
v0.6.0
v0.5.0
v0.4.0
v0.3.0
v0.2.0
v0.1.0
Go to latest
GUIDES
Modules
Mix
Tasks
Changelog
🐬 MySQL Support
⚗️ Automated Installer
📔 Logging Enhancements
⛵️ Official JSON
v2.19.2 — 2025-02-18
v2.19.1 — 2025-01-27
v2.19.0 — 2025-01-16
Introduction
Installation
Semi-Automatic Installation
Igniter Installation
Manual Installation
Ready for Production
Logging
Pruning Jobs
Rescuing Jobs
Error Handling
Ship It!
Learning
Defining Queues
Basic Queue Configuration
Advanced Queue Configuration
Queue Planning Guidelines
Scheduling Jobs
Time Zone Considerations
How Scheduling Works
Distributed Scheduling
Periodic Jobs
Setting Up Periodic Jobs
How Periodic Jobs Work
Cron Expressions
Caveats & Guidelines
Unique Jobs
Detecting Unique Conflicts
Replacing Values
Unique Guarantees
Relationship Between :fields and :keys
Operational Maintenance
Understanding Job Persistence
Pruning Historic Jobs
Indexes
Instrumentation and Logging
Default Logger
Custom Handlers
Error Handling
Error Details
Retries
Reporting Errors
Clustering
Instance and Database Isolation
Running Multiple Oban Instances
Database Isolation
Advanced
Writing Plugins
Example Plugin
Calling Interface Functions
Caveats
Release Configuration
Using Config Providers
Scaling Applications
Notifications
Triggers
Uniqueness
Reindexing
Pruning
Pooling
High Concurrency
Troubleshooting
Jobs Stuck Executing Forever
Jobs or Plugins aren't Running
No Notifications with PgBouncer
Unexpectedly Re-running All Migrations
Recipes
Recursive Jobs
Use Case: Backfilling Timezone Data
Building On Recursive Jobs
Reliable Scheduled Jobs
Use Case: Delivering Daily Digest Emails
More Flexible Than CRON Scheduling
Considerations for Scheduling Jobs in the Very-Near-Future
Reporting Job Progress
Use Case: Exporting a Large Zip File
Coordinating Processes
Made Possible by Unlimited Execution
Handling Expected Failures
Use Case: Silencing Initial Notifications for Flaky Services
Splitting Queues Between Nodes
Use Case: Isolating Video Processing Intensive Jobs
Flexible Across all Environments
Migrating from Other Languages
Use Case: Inserting Jobs from Rails
Safety Guaranteed
Testing
Introduction to Testing
Setup Application Config
Setup Testing Helpers
Testing Workers
Testing Perform
Testing Other Callbacks
Testing Queues
Asserting Enqueued Jobs
Asserting Multiple Jobs
Integration Testing Queues
Testing Config
Testing Dynamic Config
Testing Dynamic Plugin Config
Upgrading
Upgrading to v2.0
Bump Your Deps
Oban.Worker Changes
Update Your Config
Update Your Tests
Update Telemetry
Update Oban.Web (Optional)
Upgrading to v2.6
Bump Your Deps
Switch to the SmartEngine
Start Gossiping
Remove the Workflow Manager
Remove Extra Lifeline Options
Drop the Beats Table
Upgrading to v2.11
Bump Your Deps
Run Oban.Migrations for v11
Update Notifier Names
Check Configuration for Multi-Node Setups
Swap the Compound Index (Optional, but Recommended)
Upgrading to v2.12
Bump Your Deps
Modify Configuration for Testing
Upgrading to v2.14
Bump Your Deps
Remove Repeater and Stager Plugins
Ensure Configuration for Testing
Upgrading to v2.17
Bump Your Deps
Run Oban.Migrations for v12 (Optional)
Disable Insert Notifications (Optional)
Remove the Gossip Plugin
Oban
Sections
Features
🌟 Oban Pro
Engines
Requirements
Installation
Quick Getting Started
Learning
Summary
Types
changeset_or_fun/0
changeset_wrapper/0
changesets_or_wrapper/0
changesets_or_wrapper_or_fun/0
drain_option/0
drain_result/0
multi/0
multi_name/0
name/0
oban_node/0
option/0
queue_all_option/0
queue_name/0
queue_option/0
queue_state/0
Functions
__using__/1
cancel_all_jobs/2
cancel_job/2
check_all_queues/1
check_queue/2
config/1
delete_all_jobs/2
delete_job/2
drain_queue/2
insert/3
insert/5
insert!/3
insert_all/3
insert_all/5
pause_all_queues/2
pause_queue/2
resume_all_queues/2
resume_queue/2
retry_all_jobs/2
retry_job/2
scale_queue/2
start_link/1
start_queue/2
stop_queue/2
whereis/1
Oban.Job
Summary
Types
args/0
changeset/0
changeset_fun/0
changeset_list/0
changeset_list_fun/0
errors/0
option/0
replace_by_state_option/0
replace_option/0
schedule_in_option/0
t/0
tags/0
time_unit/0
unique_field/0
unique_option/0
unique_period/0
unique_state/0
unique_timestamp/0
Functions
format_attempt/1
new/2
states/0
to_map/1
Oban.Migration
Sections
Usage
Isolation with Prefixes
Migrating Without Ecto
Summary
Callbacks
down/1
migrated_version/1
up/1
Functions
down/1
migrated_version/1
up/1
Oban.Testing
Sections
Usage
Examples
Matching Timestamps
Summary
Types
perform_opts/0
Functions
all_enqueued/1
assert_enqueued/1
assert_enqueued/2
build_job/3
perform_job/2
perform_job/3
refute_enqueued/1
refute_enqueued/2
refute_enqueued/3
with_testing_mode/2
Oban.Worker
Sections
Defining Workers
Enqueuing Jobs
Customizing Backoff
Execution Timeout
Snoozing Jobs
Workers in A Different Application
Prioritizing Jobs
Summary
Types
result/0
t/0
Callbacks
backoff/1
new/2
perform/1
timeout/1
Functions
from_string/1
to_string/1
Plugins
Oban.Plugin
Sections
Example
Summary
Types
option/0
Callbacks
format_logger_output/2
start_link/1
validate/1
Oban.Plugins.Cron
Sections
Usage
Options
Instrumenting with Telemetry
Summary
Types
cron_input/0
expression/0
option/0
Functions
parse/1
Oban.Plugins.Lifeline
Sections
Using the Plugin
Options
Instrumenting with Telemetry
Summary
Types
option/0
Oban.Plugins.Pruner
Sections
Using the Plugin
Options
Instrumenting with Telemetry
Summary
Types
option/0
Oban.Plugins.Reindexer
Sections
Using the Plugin
Options
Summary
Types
option/0
Extending
Oban.Config
Summary
Types
t/0
Functions
new/1
validate/1
Oban.Registry
Summary
Types
key/0
role/0
value/0
Functions
config/1
lookup/2
select/1
via/3
whereis/2
Oban.Repo
Sections
Examples
Summary
Functions
aggregate/4
all/3
checkout/3
config/1
default_options/1
default_options/2
delete/3
delete!/3
delete_all/3
exists?/3
get/4
get!/4
get_by/4
get_by!/4
get_dynamic_repo/1
in_transaction?/1
insert/3
insert!/3
insert_all/4
insert_or_update/3
insert_or_update!/3
load/3
one/3
one!/3
preload/4
put_dynamic_repo/2
query/4
query!/4
reload/3
reload!/3
rollback/2
stream/3
to_sql/3
transaction/3
update/3
update!/3
update_all/4
Oban.Telemetry
Sections
Initialization Events
Job Events
Engine Events
Notifier Events
Plugin Events
Peer Events
Queue Events
Stager Events
Default Logger
Examples
Summary
Types
event_types/0
logger_opts/0
Functions
attach_default_logger/1
default_handler_id/0
detach_default_logger/0
Notifiers
Oban.Notifier
Sections
Notifiers
Channels
Examples
Summary
Types
channel/0
name_or_conf/0
payload/0
pubsub_status/0
Callbacks
listen/2
notify/3
start_link/1
unlisten/2
Functions
listen/2
notify/3
status/1
unlisten/2
Oban.Notifiers.PG
Sections
Usage
Summary
Functions
child_spec/1
Oban.Notifiers.Postgres
Sections
Usage
Summary
Functions
handle_call/3
handle_connect/1
handle_disconnect/1
handle_info/2
handle_result/2
init/1
Peers
Oban.Peer
Sections
Available Peer Implementations
Examples
Summary
Types
conf_or_name/0
option/0
Callbacks
get_leader/1
leader?/1
start_link/1
Functions
get_leader/2
leader?/2
Oban.Peers.Database
Sections
Usage
Oban.Peers.Global
Sections
Usage
Engines
Oban.Engine
Summary
Types
conf/0
job/0
meta/0
opts/0
queryable/0
running/0
seconds/0
Callbacks
cancel_all_jobs/2
cancel_job/2
check_available/1
check_meta/3
complete_job/2
delete_all_jobs/2
delete_job/2
discard_job/2
error_job/3
fetch_jobs/3
init/2
insert_all_jobs/3
insert_all_jobs/5
insert_job/3
insert_job/5
prune_jobs/3
put_meta/4
refresh/2
rescue_jobs/3
retry_all_jobs/2
retry_job/2
shutdown/2
snooze_job/3
stage_jobs/3
Oban.Engines.Basic
Sections
Usage
Oban.Engines.Dolphin
Sections
Usage
Oban.Engines.Inline
Sections
Usage
Oban.Engines.Lite
Sections
Usage
Exceptions
Oban.CrashError
Oban.PerformError
Oban.TimeoutError
mix oban.install
Sections
Example
Options
Search documentation of Oban
Settings
Oban.CrashError
exception
(Oban v2.19.2)
View Source
Wraps unhandled exits and throws that occur during job execution.