Now how to replace the server1-conn, if the conn is declared using integrant?
(defmethod ig/init-key :app/redis [_ {:keys [redis-host
redis-port] :as opts}]
(timbre/warn "Connecting to the Redis server" opts)
(let [conn {:pool {}
:spec {:host redis-host
:port redis-port}}]
(try
(timbre/warn "Connected to the Redis - " (redis/wcar conn (redis/ping)))
;; Return the redis connection object
conn
;; When redis is not available then retrun nil
(catch Exception _
(timbre/warn "Unbale to connect with the Redis server ")
nil))))
In the docs, the code for the listener is available like this:
Now how to replace the server1-conn, if the conn is declared using integrant?