diff --git a/lib/microwaveprop/application.ex b/lib/microwaveprop/application.ex index 06a241bd..1e3f3948 100644 --- a/lib/microwaveprop/application.ex +++ b/lib/microwaveprop/application.ex @@ -127,8 +127,14 @@ defmodule Microwaveprop.Application do # Erlang's node() name in non-K8s environments. node_name = System.get_env("POD_IP") || to_string(node()) - {Phoenix.PubSub, - name: Microwaveprop.PubSub, adapter: Phoenix.PubSub.Redis, redis_opts: [url: url], node_name: node_name} + # phoenix_pubsub_redis 3.x: `redis_opts` accepts either a URL + # binary OR a keyword list of host/port/password/etc. The + # 3.1's deprecation warning ("Move :url inside the :redis_opts + # option instead") is misleading — `[url: url]` gets forwarded + # to Redix which rejects it as an unknown option (the valid + # keys are :host, :port, :password, …, NOT :url). The bare URL + # form takes the binary-clause and works correctly. + {Phoenix.PubSub, name: Microwaveprop.PubSub, adapter: Phoenix.PubSub.Redis, redis_opts: url, node_name: node_name} end end