Merge pull request #7822 from betagouv/unschedule-export-demarches-opendata
unschedule export demarches opendata
This commit is contained in:
commit
335838cc26
2 changed files with 7 additions and 4 deletions
|
@ -1,7 +1,10 @@
|
|||
class Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob
|
||||
include DatagouvCronSchedulableConcern
|
||||
self.schedule_expression = "every month at 3:00"
|
||||
|
||||
def self.schedulable?
|
||||
false
|
||||
end
|
||||
|
||||
def perform(*args)
|
||||
gzip_filepath = [
|
||||
'tmp/',
|
||||
|
|
|
@ -28,13 +28,13 @@ RSpec.describe Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob, type: :job
|
|||
|
||||
describe '#schedulable?' do
|
||||
context "when ENV['OPENDATA_ENABLED'] == 'enabled'" do
|
||||
it 'is schedulable' do
|
||||
it 'is not schedulable' do
|
||||
ENV['OPENDATA_ENABLED'] = 'enabled'
|
||||
expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_truthy
|
||||
expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_falsy
|
||||
end
|
||||
end
|
||||
context "when ENV['OPENDATA_ENABLED'] != 'enabled'" do
|
||||
it 'is schedulable' do
|
||||
it 'is not schedulable' do
|
||||
ENV['OPENDATA_ENABLED'] = nil
|
||||
expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_falsy
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue