tech: add env var to disable cron scheduling

This commit is contained in:
simon lehericey 2023-12-14 17:12:19 +01:00
parent 99d2ad3522
commit 016c392914
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=""