diff options
Diffstat (limited to 'lib/chessh/discord/notifier.ex')
-rw-r--r-- | lib/chessh/discord/notifier.ex | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/chessh/discord/notifier.ex b/lib/chessh/discord/notifier.ex index c15febe..20a99ec 100644 --- a/lib/chessh/discord/notifier.ex +++ b/lib/chessh/discord/notifier.ex @@ -21,13 +21,15 @@ defmodule Chessh.DiscordNotifier do @impl true def handle_info({:attempt_notification, notification} = body, state) do - [discord_notification_rate, discord_notification_rate_ms] = + [discord_notification_rate, discord_notification_rate_ms, reschedule_delay] = Application.get_env(:chessh, RateLimits) - |> Keyword.take([:discord_notification_rate, :discord_notification_rate_ms]) + |> Keyword.take([ + :discord_notification_rate, + :discord_notification_rate_ms, + :reschedule_delay + ]) |> Keyword.values() - reschedule_delay = Application.get_env(:chessh, RateLimits)[:reschedule_delay] - case Hammer.check_rate_inc( :redis, "discord-rate", |