Skip to content

Commit

Permalink
even more robust oidc worker
Browse files Browse the repository at this point in the history
  • Loading branch information
michaeljguarino committed Jan 25, 2023
1 parent 8707237 commit c3b2701
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
erlang 23.2
elixir 1.11.0
erlang 23.3
elixir 1.11.4
9 changes: 4 additions & 5 deletions lib/openid_connect/worker.ex
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,10 @@ defmodule OpenIDConnect.Worker do
end

def init(provider_configs) do
state =
Enum.into(provider_configs, %{}, fn {provider, config} ->
documents = update_documents!(provider, config)
{provider, %{config: config, documents: documents}}
end)
state = Enum.into(provider_configs, %{}, fn {provider, config} ->
send(self(), {:update_documents, provider})
{provider, %{config: config}}
end)

{:ok, state}
end
Expand Down

0 comments on commit c3b2701

Please sign in to comment.