This commit is contained in:
shibao 2022-02-25 22:12:55 -05:00 committed by oliviasculley
parent 7745765fc0
commit b5c46c09ec
2 changed files with 8 additions and 1 deletions

View File

@ -7,6 +7,7 @@ defmodule Lokal.Accounts do
alias Lokal.{Mailer, Repo}
alias Lokal.Accounts.{User, UserToken}
alias Ecto.{Changeset, Multi}
alias Oban.Job
## Database getters

View File

@ -15,7 +15,9 @@ defmodule Lokal.Application do
# Start the PubSub system
{Phoenix.PubSub, name: Lokal.PubSub},
# Start the Endpoint (http/https)
LokalWeb.Endpoint
LokalWeb.Endpoint,
# Add Oban
{Oban, oban_config()}
# Start a worker by calling: Lokal.Worker.start_link(arg)
# {Lokal.Worker, arg}
]
@ -39,4 +41,8 @@ defmodule Lokal.Application do
LokalWeb.Endpoint.config_change(changed, removed)
:ok
end
defp oban_config do
Application.fetch_env!(:lokal, Oban)
end
end