Fix Redis connection error - remove invalid pool_size option
- Redix doesn't support pool_size option directly - Removed pool_size from both RedisRateLimiter and RedisCache - This fixes the NimbleOptions.ValidationError on startup Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
parent
e8847ba83c
commit
b82d459aa9
2 changed files with 2 additions and 11 deletions
|
|
@ -8,18 +8,12 @@ defmodule Aprsme.RedisCache do
|
||||||
|
|
||||||
# 5 minutes in seconds
|
# 5 minutes in seconds
|
||||||
@default_ttl 300
|
@default_ttl 300
|
||||||
@redis_pool_size 5
|
|
||||||
|
|
||||||
def child_spec(opts) do
|
def child_spec(opts) do
|
||||||
name = Keyword.fetch!(opts, :name)
|
name = Keyword.fetch!(opts, :name)
|
||||||
|
|
||||||
children = [
|
children = [
|
||||||
{Redix,
|
{Redix, name: redis_name(name), host: redis_host(), port: redis_port(), password: redis_password()}
|
||||||
name: redis_name(name),
|
|
||||||
host: redis_host(),
|
|
||||||
port: redis_port(),
|
|
||||||
password: redis_password(),
|
|
||||||
pool_size: @redis_pool_size}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
|
||||||
|
|
@ -5,12 +5,9 @@ defmodule Aprsme.RedisRateLimiter do
|
||||||
|
|
||||||
require Logger
|
require Logger
|
||||||
|
|
||||||
@redis_pool_size 5
|
|
||||||
|
|
||||||
def child_spec(_opts) do
|
def child_spec(_opts) do
|
||||||
children = [
|
children = [
|
||||||
{Redix,
|
{Redix, name: __MODULE__, host: redis_host(), port: redis_port(), password: redis_password()}
|
||||||
name: __MODULE__, host: redis_host(), port: redis_port(), password: redis_password(), pool_size: @redis_pool_size}
|
|
||||||
]
|
]
|
||||||
|
|
||||||
%{
|
%{
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue