0
respostas

Erro ao rodar a aplicação com mix run

Primeiro apareceu uma opção para baixar uma dependência a mais de uma dependência do quantum, e então veio esse erro aqui:

** (Mix) Could not start application elixir_teste: ElixirTeste.Aplicacao.start(:normal, []) returned an error: shutdown: failed to start child: ElixirTeste.Agendador
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function Kernel.then/2 is undefined or private
            (elixir) Kernel.then([executor_supervisor_name: ElixirTeste.Agendador.ExecutorSupervisor, node_selector_broadcaster_name: ElixirTeste.Agendador.NodeSelectorBroadcaster, execution_broadcaster_name: ElixirTeste.Agendador.ExecutionBroadcaster, job_broadcaster_name: ElixirTeste.Agendador.JobBroadcaster, clock_broadcaster_name: ElixirTeste.Agendador.ClockBroadcaster, task_registry_name: ElixirTeste.Agendador.TaskRegistry, storage_name: ElixirTeste.Agendador.Storage, task_supervisor_name: ElixirTeste.Agendador.TaskSupervisor, name: ElixirTeste.Agendador, scheduler: ElixirTeste.Agendador, otp_app: :elixir_teste, timeout: 5000, schedule: nil, overlap: true, state: :active, timezone: :utc, run_strategy: {Quantum.RunStrategy.Random, :cluster}, debug_logging: true, storage: Quantum.Storage.Noop, jobs: [{"*****", #Function<21.126501267/0 in :erl_eval.expr/5>}]], #Function<1.72259742/1 in Quantum.scheduler_config/3>)
            (quantum) lib/quantum.ex:306: Quantum.scheduler_config/3
            (elixir_teste) lib/quantum.ex:357: ElixirTeste.Agendador.start_link/1
            (stdlib) supervisor.erl:379: :supervisor.do_start_child_i/3
            (stdlib) supervisor.erl:365: :supervisor.do_start_child/2
            (stdlib) supervisor.erl:349: anonymous fn/3 in :supervisor.start_children/2
            (stdlib) supervisor.erl:1157: :supervisor.children_map/4
            (stdlib) supervisor.erl:315: :supervisor.init_children/2