From 7073326b22f0d561bb4b243b18a603d0479bc36a Mon Sep 17 00:00:00 2001 From: Zemuldo Date: Sat, 28 Oct 2023 18:52:43 +0300 Subject: [PATCH] no limit for system env fetch --- lib/utils/secret_fetch_limiter.ex | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/utils/secret_fetch_limiter.ex b/lib/utils/secret_fetch_limiter.ex index 328fb64..e6bc19e 100644 --- a/lib/utils/secret_fetch_limiter.ex +++ b/lib/utils/secret_fetch_limiter.ex @@ -32,11 +32,13 @@ defmodule ExSecrets.Utils.SecretFetchLimiter do end def allow(key, module, function, args) do - case :ets.whereis(@table_name) do - :undefined -> + case {:ets.whereis(@table_name), args} do + {_, [_, :system_env]} -> + Kernel.apply(module, function, args) + {:undefined, _} -> Kernel.apply(module, function, args) - _ -> + {_, _} -> now = current_time() @table_name