mirror of
https://github.com/plausible/analytics.git
synced 2024-12-24 18:12:44 +03:00
Don't execute queues when cron_enabled=false
This commit is contained in:
parent
8923a35903
commit
cc673b88df
@ -97,16 +97,22 @@ else
|
||||
false
|
||||
end
|
||||
|
||||
config :plausible, Oban,
|
||||
repo: Plausible.Repo,
|
||||
queues: [
|
||||
queues = if String.to_existing_atom(System.get_env("CRON_ENABLED", "false")) do
|
||||
[
|
||||
provision_ssl_certificates: 1,
|
||||
fetch_tweets: 1,
|
||||
check_stats_emails: 1,
|
||||
email_reports: 1,
|
||||
site_setup_emails: 1,
|
||||
trial_notification_emails: 1
|
||||
],
|
||||
]
|
||||
else
|
||||
[]
|
||||
end
|
||||
|
||||
config :plausible, Oban,
|
||||
repo: Plausible.Repo,
|
||||
queues: queues,
|
||||
crontab: crontab
|
||||
|
||||
config :plausible, :google,
|
||||
|
@ -144,16 +144,18 @@ crontab = [
|
||||
{"*/10 * * * *", Plausible.Workers.ProvisionSslCertificates}, # Every 10 minutes
|
||||
]
|
||||
|
||||
config :plausible, Oban,
|
||||
repo: Plausible.Repo,
|
||||
queues: [
|
||||
queues = [
|
||||
provision_ssl_certificates: 1,
|
||||
fetch_tweets: 1,
|
||||
check_stats_emails: 1,
|
||||
email_reports: 1,
|
||||
site_setup_emails: 1,
|
||||
trial_notification_emails: 1
|
||||
],
|
||||
]
|
||||
|
||||
config :plausible, Oban,
|
||||
repo: Plausible.Repo,
|
||||
queues: if cron_enabled, do: queues, else: []
|
||||
crontab: if cron_enabled, do: crontab, else: false
|
||||
|
||||
config :logger, level: :warn
|
||||
|
Loading…
Reference in New Issue
Block a user