Sha256: 5d08b24abf22fa255204aeedcb037b9ae888a271e4fd479492453225f68d9d83

Contents?: true

Size: 439 Bytes

Versions: 11

Compression:

Stored size: 439 Bytes

Contents

# frozen_string_literal: true

module Decidim
  class OpenDataJob < ApplicationJob
    queue_as :default

    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?

      OpenDataUploader.new(organization).store!(File.open(path, "rb"))
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
decidim-core-0.24.3 app/jobs/decidim/open_data_job.rb
decidim-core-0.23.6 app/jobs/decidim/open_data_job.rb
decidim-core-0.24.2 app/jobs/decidim/open_data_job.rb
decidim-core-0.23.5 app/jobs/decidim/open_data_job.rb
decidim-core-0.24.1 app/jobs/decidim/open_data_job.rb
decidim-core-0.24.0 app/jobs/decidim/open_data_job.rb
decidim-core-0.24.0.rc2 app/jobs/decidim/open_data_job.rb
decidim-core-0.23.4 app/jobs/decidim/open_data_job.rb
decidim-core-0.24.0.rc1 app/jobs/decidim/open_data_job.rb
decidim-core-0.23.3 app/jobs/decidim/open_data_job.rb
decidim-core-0.23.2 app/jobs/decidim/open_data_job.rb