Sha256: 314a3b05a45d186a814c9097157174bb043634d88b565467ba2d6cc69b9068fa
Contents?: true
Size: 545 Bytes
Versions: 13
Compression:
Stored size: 545 Bytes
Contents
# frozen_string_literal: true module Decidim class OpenDataJob < ApplicationJob queue_as :exports def perform(organization) path = Rails.root.join("tmp/#{organization.open_data_file_path}") exporter = OpenDataExporter.new(organization, path) raise "Could not generate Open Data export" unless exporter.export.positive? organization.open_data_file.attach(io: File.open(path, "rb"), filename: organization.open_data_file_path) # Deletes the temporary file file File.delete(path) end end end
Version data entries
13 entries across 13 versions & 1 rubygems