We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Guardian.DB.Sweeper
Configure using the old (deprecated) worker(...) notation (as defined in the examples in lib/guardian/db.ex):
worker(...)
lib/guardian/db.ex
children = [ worker(Guardian.DB.Sweeper, [interval: 60]) ]
Configures the worker correctly, just like as if it were called using the new notation (as defined in the README):
children = [ {Guardian.DB.Sweeper, [interval: 60]} ]
shutdown: failed to start child: Guardian.DB.Sweeper ** (EXIT) an exception was raised: ** (FunctionClauseError) no function clause matching in Keyword.get/3 (elixir 1.13.4) lib/keyword.ex:352: Keyword.get({:interval, 180000}, :interval, 3600000) (guardian_db 3.0.0) lib/guardian/db/sweeper.ex:19: Guardian.DB.Sweeper.start_link/1 (stdlib 4.3.1) supervisor.erl:414: :supervisor.do_start_child_i/3 (stdlib 4.3.1) supervisor.erl:400: :supervisor.do_start_child/2 (stdlib 4.3.1) supervisor.erl:384: anonymous fn/3 in :supervisor.start_children/2 (stdlib 4.3.1) supervisor.erl:1250: :supervisor.children_map/4 (stdlib 4.3.1) supervisor.erl:350: :supervisor.init_children/2 (stdlib 4.3.1) gen_server.erl:851: :gen_server.init_it/2 (stdlib 4.3.1) gen_server.erl:814: :gen_server.init_it/6 (stdlib 4.3.1) proc_lib.erl:240: :proc_lib.init_p_do_apply/3
The text was updated successfully, but these errors were encountered:
Weird, I do not see the child_spec but it works doing the following:
child_spec
test "testing supervisor" do children = [ {Guardian.DB.Sweeper, [interval: 60 * 60 * 1000]} ] assert {:ok, pid} = Supervisor.start_link(children, strategy: :one_for_one) assert %{active: 1, specs: 1, supervisors: 0, workers: 1} = Supervisor.count_children(pid) end
What elixir and erlang version are you using?
Sorry, something went wrong.
No branches or pull requests
Steps to Reproduce
Configure using the old (deprecated)
worker(...)
notation (as defined in the examples inlib/guardian/db.ex
):Expected Result
Configures the worker correctly, just like as if it were called using the new notation (as defined in the README):
Actual Result
The text was updated successfully, but these errors were encountered: