diff options
author | Simponic <elizabeth.hunt@simponic.xyz> | 2023-02-15 19:50:39 -0700 |
---|---|---|
committer | Simponic <elizabeth.hunt@simponic.xyz> | 2023-02-15 19:50:39 -0700 |
commit | 7e8120ad3545785c562a239c2233eb5de5a53237 (patch) | |
tree | 08ee581eed6cb55091b142ec9f97d9946ed25555 | |
parent | e088d1f8cd66d8dd24484c8dd7eb09b031b5c1de (diff) | |
download | chessh-7e8120ad3545785c562a239c2233eb5de5a53237.tar.gz chessh-7e8120ad3545785c562a239c2233eb5de5a53237.zip |
Change config module to DiscordNotifications for reschedule delay
-rw-r--r-- | lib/chessh/discord/notifier.ex | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/chessh/discord/notifier.ex b/lib/chessh/discord/notifier.ex index 20a99ec..7751041 100644 --- a/lib/chessh/discord/notifier.ex +++ b/lib/chessh/discord/notifier.ex @@ -21,15 +21,16 @@ defmodule Chessh.DiscordNotifier do @impl true 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) |> Keyword.take([ :discord_notification_rate, - :discord_notification_rate_ms, - :reschedule_delay + :discord_notification_rate_ms ]) |> Keyword.values() + reschedule_delay = Application.get_env(:chessh, DiscordNotifications)[:reschedule_delay] + case Hammer.check_rate_inc( :redis, "discord-rate", |