Merge pull request #9859 from demarches-simplifiees/add_env_var_to_disable_cron_scheduling

TECH: ajoute une variable d'environnement pour désactiver l'activation de cron job
This commit is contained in:
LeSim 2023-12-14 16:22:00 +00:00 committed by GitHub
commit 17e44fd0dd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View file

@ -4,7 +4,7 @@ class Cron::CronJob < ApplicationJob
class << self
def schedulable?
true
true && ENV['CRON_JOBS_DISABLED'].blank?
end
def schedule

View file

@ -259,3 +259,6 @@ WEASYPRINT_URL="http://10.33.23.204:5000/pdf"
# Use this env var customize the max number of deleted user per day
EXPIRE_USER_DELETION_JOB_LIMIT=10000
# write anything to disable cron jobs
CRON_JOBS_DISABLED=""