Add concern for Datagouv schedulable jobs
This commit is contained in:
parent
a156529394
commit
ec3118e82c
1 changed files with 8 additions and 0 deletions
8
app/jobs/concerns/datagouv_cron_schedulable_concern.rb
Normal file
8
app/jobs/concerns/datagouv_cron_schedulable_concern.rb
Normal file
|
@ -0,0 +1,8 @@
|
|||
module DatagouvCronSchedulableConcern
|
||||
extend ActiveSupport::Concern
|
||||
class_methods do
|
||||
def schedulable?
|
||||
ENV.fetch('OPENDATA_ENABLED', nil) == 'enabled'
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue