Proper way of starting Oban

Hi all,

New to Oban, and while setting it up, I run into some trivial issues, that I didn’t found to be mentioned in the docs…

What’s the proper way of starting up Oban?

What I do right now is to:

  1. configure it properly in config/config.exs:
config :my_app, Oban,
    engine: Oban.Engines.Basic,
    queues: [default: 10, events: 10],
    repo: MyApp.Repo,
    testing: :inline # optional
  1. start it from my application, so
children = [
     ...,
     {Oban, Application.get_env(:my_app, Oban)},
]

The bullet point 2) was actually the missing bit of information. AFAIK, it’s not explicitly mentioned in the docs, only in case you want to run multiple Oban instances.

How do you start Oban? Is this the proper way, given that I don’t have any special needs?

Installation — Oban v2.18.2 uses that exact snippet

3 Likes

My bad! It’s exactly as you say :confused: Sorry for the noise and wasting everyone’s time. I was likely looking for that information on the Oban page, not on the Installation guide. Reminder to myself: 1) RTFM properly 2) go to bed when eyes feel like closing.

1 Like

You’re not wasting anyone’s time when asking respectful questions and learning. Also, we love a good doc hunt.

@LostKobrakai is a coffer of knowledge. He just knows. :fireworks:

4 Likes