Revert "unschedule export demarches opendata"

This reverts commit da0738c661.
`ExportAndPublishDemarchesPubliqjesJob` is now schedulable
This commit is contained in:
Christophe Robillard 2022-12-19 16:10:22 +01:00
parent dd0a05c1d8
commit daa4411abe
2 changed files with 4 additions and 7 deletions

View file

@ -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/',

View file

@ -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