Skip to content

Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.

Fix usage checking job

Uku Taht0fb8f09b41e6
diff --git a/lib/workers/check_usage.ex b/lib/workers/check_usage.ex
index e1b4b4208d..e37009be75 100644
--- a/lib/workers/check_usage.ex
+++ b/lib/workers/check_usage.ex
@@ -54,7 +54,12 @@ defmodule Plausible.Workers.CheckUsage do
if last_last_month > allowance && last_month > allowance do
{_, last_cycle} = billing_mod.last_two_billing_cycles(subscriber)
template = PlausibleWeb.Email.over_limit_email(subscriber, last_month, last_cycle)
- Plausible.Mailer.send_email(template)
+
+ try do
+ Plausible.Mailer.send_email(template)
+ rescue
+ _ -> nil
+ end
end
end