diff --git a/app/jobs/concerns/datagouv_cron_schedulable_concern.rb b/app/jobs/concerns/datagouv_cron_schedulable_concern.rb new file mode 100644 index 000000000..8541a0722 --- /dev/null +++ b/app/jobs/concerns/datagouv_cron_schedulable_concern.rb @@ -0,0 +1,8 @@ +module DatagouvCronSchedulableConcern + extend ActiveSupport::Concern + class_methods do + def schedulable? + ENV.fetch('OPENDATA_ENABLED', nil) == 'enabled' + end + end +end