Browse Source
* Remove CSV export * Add collection to lettings export * Use staging bucketpull/1536/head v0.3.11
James Rose
2 years ago
committed by
GitHub
7 changed files with 42 additions and 112 deletions
@ -1,10 +0,0 @@
|
||||
class DataExportCsvJob < ApplicationJob |
||||
queue_as :default |
||||
|
||||
def perform |
||||
storage_service = Storage::S3Service.new(Configuration::PaasConfigurationService.new, ENV["EXPORT_PAAS_INSTANCE"]) |
||||
export_service = Exports::LettingsLogExportService.new(storage_service) |
||||
|
||||
export_service.export_csv_lettings_logs |
||||
end |
||||
end |
@ -0,0 +1,5 @@
|
||||
class AddCollectionToLogsExport < ActiveRecord::Migration[7.0] |
||||
def change |
||||
add_column :logs_exports, :collection, :string |
||||
end |
||||
end |
@ -1,19 +0,0 @@
|
||||
require "rails_helper" |
||||
|
||||
describe DataExportCsvJob do |
||||
let(:storage_service) { instance_double(Storage::S3Service) } |
||||
let(:paas_config_service) { instance_double(Configuration::PaasConfigurationService) } |
||||
let(:export_service) { instance_double(Exports::LettingsLogExportService) } |
||||
|
||||
before do |
||||
allow(Storage::S3Service).to receive(:new).and_return(storage_service) |
||||
allow(Configuration::PaasConfigurationService).to receive(:new).and_return(paas_config_service) |
||||
allow(Exports::LettingsLogExportService).to receive(:new).and_return(export_service) |
||||
end |
||||
|
||||
it "calls the export service" do |
||||
expect(export_service).to receive(:export_csv_lettings_logs) |
||||
|
||||
described_class.perform_now |
||||
end |
||||
end |
Loading…
Reference in new issue