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