Rihanna v2.3.1 Rihanna.Supervisor View Source
The main supervisor for Rihanna.
Starts the Postgrex process necessary for enqueueing jobs, and also starts a dispatcher for processing them.
Setup
Add Rihanna.Supervisor
to your supervision tree.
By adding it to your supervision tree it will automatically start running jobs when your app boots.
Rihanna requires a database configuration to be passed in under the postgrex
key. This is passed through directly to Postgrex.
If you are already using Ecto you can avoid duplicating your DB config by
pulling this out of your existing Repo using My.Repo.config()
.
# NOTE: In Phoenix you would find this inside `lib/my_app/application.ex`
children = [
{Rihanna.Supervisor, [name: Rihanna.Supervisor, postgrex: My.Repo.config()]}
]
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
.