Sha256: 1271995eb6b552d9f6fc456867fd51bbc877515d8e7e63aba3b5fe3577ee8b33
Contents?: true
Size: 480 Bytes
Versions: 24
Compression:
Stored size: 480 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 "Couldn't generate Open Data export" unless exporter.export.positive? organization.open_data_file.attach(io: File.open(path, "rb"), filename: organization.open_data_file_path) end end end
Version data entries
24 entries across 24 versions & 1 rubygems