fix oban
This commit is contained in:
		| @@ -7,6 +7,7 @@ defmodule Lokal.Accounts do | |||||||
|   alias Lokal.{Mailer, Repo} |   alias Lokal.{Mailer, Repo} | ||||||
|   alias Lokal.Accounts.{User, UserToken} |   alias Lokal.Accounts.{User, UserToken} | ||||||
|   alias Ecto.{Changeset, Multi} |   alias Ecto.{Changeset, Multi} | ||||||
|  |   alias Oban.Job | ||||||
|  |  | ||||||
|   ## Database getters |   ## Database getters | ||||||
|  |  | ||||||
|   | |||||||
| @@ -15,7 +15,9 @@ defmodule Lokal.Application do | |||||||
|       # Start the PubSub system |       # Start the PubSub system | ||||||
|       {Phoenix.PubSub, name: Lokal.PubSub}, |       {Phoenix.PubSub, name: Lokal.PubSub}, | ||||||
|       # Start the Endpoint (http/https) |       # Start the Endpoint (http/https) | ||||||
|       LokalWeb.Endpoint |       LokalWeb.Endpoint, | ||||||
|  |       # Add Oban | ||||||
|  |       {Oban, oban_config()} | ||||||
|       # Start a worker by calling: Lokal.Worker.start_link(arg) |       # Start a worker by calling: Lokal.Worker.start_link(arg) | ||||||
|       # {Lokal.Worker, arg} |       # {Lokal.Worker, arg} | ||||||
|     ] |     ] | ||||||
| @@ -39,4 +41,8 @@ defmodule Lokal.Application do | |||||||
|     LokalWeb.Endpoint.config_change(changed, removed) |     LokalWeb.Endpoint.config_change(changed, removed) | ||||||
|     :ok |     :ok | ||||||
|   end |   end | ||||||
|  |  | ||||||
|  |   defp oban_config do | ||||||
|  |     Application.fetch_env!(:lokal, Oban) | ||||||
|  |   end | ||||||
| end | end | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user