Submit social housing lettings and sales data (CORE)
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
require "nokogiri"
|
|
|
|
|
|
|
|
namespace :data_import do
|
|
|
|
desc "Import Organisation XMLs from Softwire system"
|
|
|
|
|
|
|
|
# rake data_import:organisations['path/to/xml_files']
|
|
|
|
task :organisations, %i[path] => :environment do |_task, args|
|
|
|
|
directory = args.path
|
|
|
|
storage_service = StorageService.new(PaasConfigurationService.new, ENV["IMPORT_PAAS_INSTANCE"])
|
|
|
|
import_service = ImportService.new(storage_service)
|
|
|
|
import_service.update_organisations(directory)
|
|
|
|
end
|
|
|
|
end
|