class MerrittZK::LegacyIngestJob

Legacy Merritt Ingest Job record. This class will be removed after the migration is complete

Constants

DIR

Public Class Methods

list_jobs_as_json(zk) click to toggle source

List legacy ingest jobs as a json object that will be consumed by the admin tool.

# File lib/merritt_zk_job.rb, line 297
def self.list_jobs_as_json(zk)
  jobs = []
  return jobs unless zk.exists?(DIR)

  zk.children(DIR).sort.each do |cp|
    lj = LegacyIngestJob.new(cp)
    lj.load(zk)
    jobs.append(lj.payload_object)
  end
  jobs
end

Public Instance Methods

bid() click to toggle source
# File lib/merritt_zk_job.rb, line 283
def bid
  @payload.fetch(:bid, '')
end
creator() click to toggle source
# File lib/merritt_zk_job.rb, line 255
def creator
  @payload.fetch(:creator, '')
end
dir() click to toggle source
# File lib/merritt_zk_job.rb, line 247
def dir
  DIR
end
filename() click to toggle source
# File lib/merritt_zk_job.rb, line 267
def filename
  @payload.fetch(:filename, '')
end
priority() click to toggle source
# File lib/merritt_zk_job.rb, line 287
def priority
  @payload.fetch(:priority, 0)
end
profile() click to toggle source
# File lib/merritt_zk_job.rb, line 259
def profile
  @payload.fetch(:profile, '')
end
response_form() click to toggle source
# File lib/merritt_zk_job.rb, line 263
def response_form
  @payload.fetch(:responseForm, '')
end
space_needed() click to toggle source
# File lib/merritt_zk_job.rb, line 291
def space_needed
  @payload.fetch(:space_needed, 0)
end
submitter() click to toggle source
# File lib/merritt_zk_job.rb, line 251
def submitter
  @payload.fetch(:submitter, '')
end
title() click to toggle source
# File lib/merritt_zk_job.rb, line 279
def title
  @payload.fetch(:title, '')
end
type() click to toggle source
# File lib/merritt_zk_job.rb, line 275
def type
  @payload.fetch(:type, '')
end
udpate() click to toggle source
# File lib/merritt_zk_job.rb, line 271
def udpate
  @payload.fetch(:update, false)
end