Change config module to DiscordNotifications for reschedule delay
This commit is contained in:
parent
e088d1f8cd
commit
7e8120ad35
@ -21,15 +21,16 @@ defmodule Chessh.DiscordNotifier do
|
|||||||
|
|
||||||
@impl true
|
@impl true
|
||||||
def handle_info({:attempt_notification, notification} = body, state) do
|
def handle_info({:attempt_notification, notification} = body, state) do
|
||||||
[discord_notification_rate, discord_notification_rate_ms, reschedule_delay] =
|
[discord_notification_rate, discord_notification_rate_ms] =
|
||||||
Application.get_env(:chessh, RateLimits)
|
Application.get_env(:chessh, RateLimits)
|
||||||
|> Keyword.take([
|
|> Keyword.take([
|
||||||
:discord_notification_rate,
|
:discord_notification_rate,
|
||||||
:discord_notification_rate_ms,
|
:discord_notification_rate_ms
|
||||||
:reschedule_delay
|
|
||||||
])
|
])
|
||||||
|> Keyword.values()
|
|> Keyword.values()
|
||||||
|
|
||||||
|
reschedule_delay = Application.get_env(:chessh, DiscordNotifications)[:reschedule_delay]
|
||||||
|
|
||||||
case Hammer.check_rate_inc(
|
case Hammer.check_rate_inc(
|
||||||
:redis,
|
:redis,
|
||||||
"discord-rate",
|
"discord-rate",
|
||||||
|
Loading…
Reference in New Issue
Block a user