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
|
false
|
||||||
end
|
end
|
||||||
|
|
||||||
config :plausible, Oban,
|
queues = if String.to_existing_atom(System.get_env("CRON_ENABLED", "false")) do
|
||||||
repo: Plausible.Repo,
|
[
|
||||||
queues: [
|
|
||||||
provision_ssl_certificates: 1,
|
provision_ssl_certificates: 1,
|
||||||
fetch_tweets: 1,
|
fetch_tweets: 1,
|
||||||
check_stats_emails: 1,
|
check_stats_emails: 1,
|
||||||
email_reports: 1,
|
email_reports: 1,
|
||||||
site_setup_emails: 1,
|
site_setup_emails: 1,
|
||||||
trial_notification_emails: 1
|
trial_notification_emails: 1
|
||||||
],
|
]
|
||||||
|
else
|
||||||
|
[]
|
||||||
|
end
|
||||||
|
|
||||||
|
config :plausible, Oban,
|
||||||
|
repo: Plausible.Repo,
|
||||||
|
queues: queues,
|
||||||
crontab: crontab
|
crontab: crontab
|
||||||
|
|
||||||
config :plausible, :google,
|
config :plausible, :google,
|
||||||
|
@ -144,16 +144,18 @@ crontab = [
|
|||||||
{"*/10 * * * *", Plausible.Workers.ProvisionSslCertificates}, # Every 10 minutes
|
{"*/10 * * * *", Plausible.Workers.ProvisionSslCertificates}, # Every 10 minutes
|
||||||
]
|
]
|
||||||
|
|
||||||
|
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,
|
config :plausible, Oban,
|
||||||
repo: Plausible.Repo,
|
repo: Plausible.Repo,
|
||||||
queues: [
|
queues: if cron_enabled, do: queues, else: []
|
||||||
provision_ssl_certificates: 1,
|
|
||||||
fetch_tweets: 1,
|
|
||||||
check_stats_emails: 1,
|
|
||||||
email_reports: 1,
|
|
||||||
site_setup_emails: 1,
|
|
||||||
trial_notification_emails: 1
|
|
||||||
],
|
|
||||||
crontab: if cron_enabled, do: crontab, else: false
|
crontab: if cron_enabled, do: crontab, else: false
|
||||||
|
|
||||||
config :logger, level: :warn
|
config :logger, level: :warn
|
||||||
|
Loading…
Reference in New Issue
Block a user