Revert "unschedule export demarches opendata"
This reverts commit da0738c661
.
`ExportAndPublishDemarchesPubliqjesJob` is now schedulable
This commit is contained in:
parent
dd0a05c1d8
commit
daa4411abe
2 changed files with 4 additions and 7 deletions
|
@ -1,10 +1,7 @@
|
|||
class Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob < Cron::CronJob
|
||||
include DatagouvCronSchedulableConcern
|
||||
self.schedule_expression = "every month at 4: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 not schedulable' do
|
||||
it 'is schedulable' do
|
||||
ENV['OPENDATA_ENABLED'] = 'enabled'
|
||||
expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_falsy
|
||||
expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_truthy
|
||||
end
|
||||
end
|
||||
context "when ENV['OPENDATA_ENABLED'] != 'enabled'" do
|
||||
it 'is not schedulable' do
|
||||
it 'is schedulable' do
|
||||
ENV['OPENDATA_ENABLED'] = nil
|
||||
expect(Cron::Datagouv::ExportAndPublishDemarchesPubliquesJob.schedulable?).to be_falsy
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue