Sha256: d0a79234ccfd75284dccc30068bd388cf77f1d4650b815e6d9b87ae13990a826

Contents?: true

Size: 427 Bytes

Versions: 4

Compression:

Stored size: 427 Bytes

Contents

require 'iqvoc/skos_importer'

class ImportJob < Struct.new(:import, :content, :user, :namespace, :publish)
  def perform
    strio = StringIO.new

    importer = Iqvoc::SkosImporter.new(content.to_s.split("\n"), namespace, Logger.new(strio), publish)
    importer.run
    @messages = strio.string
  end

  def success(job)
    import.finish!(@messages)
  end

  def error(job, exception)
    import.fail!(exception)
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
iqvoc-4.3.3 app/jobs/import_job.rb
iqvoc-4.3.2 app/jobs/import_job.rb
iqvoc-4.3.1 app/jobs/import_job.rb
iqvoc-4.3.0 app/jobs/import_job.rb