Skip to content

Commit

Permalink
🐛 Fix compile/runtime Sequin.Redis
Browse files Browse the repository at this point in the history
  • Loading branch information
RTLS committed Dec 27, 2024
1 parent 6562196 commit 61bcfba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/sequin/redis.ex
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,9 @@ defmodule Sequin.Redis do
@moduledoc false
alias Sequin.Error

@config Application.compile_env(:sequin, __MODULE__, [])

def child_spec do
url = Keyword.fetch!(@config, :url)
opts = Keyword.get(@config, :opts, [])
url = Keyword.fetch!(config(), :url)
opts = Keyword.get(config(), :opts, [])
opts = [name: __MODULE__] ++ opts
{Redix, {url, opts}}
end
Expand Down Expand Up @@ -58,4 +56,6 @@ defmodule Sequin.Redis do
code: "command_error"
)
end

defp config, do: Application.get_env(:sequin, __MODULE__, [])
end

0 comments on commit 61bcfba

Please sign in to comment.