Documentation
README
Oban
Handle durable jobs, serialization, failures, and workflow composition with Oban.
Part 1: Oban (Non-Pro)
The Iron Law: JSON Serialization
JOB ARGS ARE JSON. ATOMS BECOME STRINGS.
This single fact causes most Oban debugging headaches.
# Creating - atom keys are fine
MyWorker.new(%{user_id: 123})
# Processing - must use string keys (JSON converted atoms to strings)
def perform(%Oban.Job{args: %{"user_id" => user_id}}) do
# ...
end
Error Handling: Let It Crash
Don't catch errors in Oban jobs. Let them bubble up to Oban for proper handling.
Why?
This is the opening of the README. Read the full README on GitHub.