Sha256: 960ad81b823b2c9d50a4d08a4e86150288c31b35a708220601563e7ced4e9c18
Contents?: true
Size: 567 Bytes
Versions: 10
Compression:
Stored size: 567 Bytes
Contents
class ImportJob < Struct.new(:import, :filename, :user, :namespace, :publish) def enqueue(job) job.delayed_reference_id = import.id job.delayed_reference_type = import.class.to_s job.delayed_global_reference_id = import.to_global_id job.save! end def perform strio = StringIO.new importer = SkosImporter.new(filename, 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
10 entries across 10 versions & 1 rubygems