Dabsy
March 16, 2021, 7:09pm
1
Why is Redix using the CLIENT command? I have a custom session store implementation for my Phoenix app and when attempting to configure_session(conn, renew: true) in production this command is being received and the command is being blocked by the service hosting the Redis instance as it is unsupported
defp get_client_reply(data, commands) do
{ncommands, client_reply} = get_client_reply(commands, _ncommands = 0, data.client_reply)
{ncommands, put_in(data.client_reply, client_reply)}
end
defp get_client_reply([], ncommands, client_reply) do
{ncommands, client_reply}
end
defp get_client_reply([command | rest], ncommands, client_reply) do
case parse_client_reply(command) do
:off -> get_client_reply(rest, ncommands, :off)
:skip when client_reply == :off -> get_client_reply(rest, ncommands, :off)
:skip -> get_client_reply(rest, ncommands, :skip)
:on -> get_client_reply(rest, ncommands + 1, :on)
nil when client_reply == :on -> get_client_reply(rest, ncommands + 1, client_reply)
nil when client_reply == :off -> get_client_reply(rest, ncommands, client_reply)
nil when client_reply == :skip -> get_client_reply(rest, ncommands, :on)
end
end
thanks
@whatyouhide is author iirc? Just a helpful tag
Dabsy
March 17, 2021, 5:28pm
3
Turns out it only happens if you use noreply_command
commands which had totally slipped by me