I upgraded from elixir 1.6.6 to 1.10.4. Before the upgrade all tests were passing. Now I have about 10 tests failing. At some point the application is shutdown which inevitably makes the rest of the tests fail. The shutdown is caused by this error:
16:11:29.767 [error] GenServer Verk.ScheduleManager terminating
** (UndefinedFunctionError) function Redix.command/2 is undefined or private
(redix 0.7.1) Redix.command(#PID<0.6698.0>, ["EVALSHA", "2f42b81434c4ff28b1b82414f7e76b67a1d6e933", 1, "schedule", 1612473089])
(verk 1.4.1) lib/verk/schedule_manager.ex:59: Verk.ScheduleManager.handle_info/3
(stdlib 3.12.1) gen_server.erl:637: :gen_server.try_dispatch/4
(stdlib 3.12.1) gen_server.erl:711: :gen_server.handle_msg/6
(stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: :fetch_scheduled
State: %Verk.ScheduleManager.State{redis: #PID<0.6698.0>}
16:11:29.768 [warn] Pausing all queues. Max timeout: 30000
16:11:29.769 [error] GenServer #PID<0.6873.0> terminating
** (stop) exited in: GenServer.call(:"whatever-volcano.workers_manager", :pause, 5000)
** (EXIT) no process: the process is not alive or there's no process currently associated with the given name, possibly because its application isn't started
(elixir 1.10.4) lib/gen_server.ex:1013: GenServer.call/3
(verk 1.4.1) lib/verk/manager.ex:45: Verk.Manager.pause/1
(verk 1.4.1) lib/verk/queues_drainer.ex:60: anonymous fn/3 in Verk.QueuesDrainer.do_terminate/1
(elixir 1.10.4) lib/enum.ex:2111: Enum."-reduce/3-lists^foldl/2-0-"/3
(verk 1.4.1) lib/verk/queues_drainer.ex:59: Verk.QueuesDrainer.do_terminate/1
(stdlib 3.12.1) gen_server.erl:673: :gen_server.try_terminate/3
(stdlib 3.12.1) gen_server.erl:858: :gen_server.terminate/10
(stdlib 3.12.1) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
Last message: {:EXIT, #PID<0.6693.0>, :shutdown}
State: 30000
16:54:08.847 [error] Failed to fetch a job. Reason: 1
I understand the error:
** (UndefinedFunctionError) function Redix.command/2 is undefined or private
is telling me that I’m passing in 2 arguments instead of 3 to Redix.command function.
This is what’s being passed in:
Redix.command(#PID<0.6698.0>, ["EVALSHA", "2f42b81434c4ff28b1b82414f7e76b67a1d6e933", 1, "schedule", 1612473089])
Which appears congruent with what’s laid out in redix docs example:
Redix.command(conn, ["SET", "mykey", "foo"])
Also like I said, this was working before elixir upgrade so I’m at a loss as to why I’m suddenly having problems with Redix.
Any help would be greatly appreciated! Thanks ahead of time.