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
|
||||
@default_ttl 300
|
||||
@redis_pool_size 5
|
||||
|
||||
def child_spec(opts) do
|
||||
name = Keyword.fetch!(opts, :name)
|
||||
|
||||
children = [
|
||||
{Redix,
|
||||
name: redis_name(name),
|
||||
host: redis_host(),
|
||||
port: redis_port(),
|
||||
password: redis_password(),
|
||||
pool_size: @redis_pool_size}
|
||||
{Redix, name: redis_name(name), host: redis_host(), port: redis_port(), password: redis_password()}
|
||||
]
|
||||
|
||||
%{
|
||||
|
|
|
|||
|
|
@ -5,12 +5,9 @@ defmodule Aprsme.RedisRateLimiter do
|
|||
|
||||
require Logger
|
||||
|
||||
@redis_pool_size 5
|
||||
|
||||
def child_spec(_opts) do
|
||||
children = [
|
||||
{Redix,
|
||||
name: __MODULE__, host: redis_host(), port: redis_port(), password: redis_password(), pool_size: @redis_pool_size}
|
||||
{Redix, name: __MODULE__, host: redis_host(), port: redis_port(), password: redis_password()}
|
||||
]
|
||||
|
||||
%{
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue