Sha256: 53e5eda6a5f22cf2a2dcecb78c7705ba14cdb1e7ff48b57263964a919b68f548
Contents?: true
Size: 482 Bytes
Versions: 9
Compression:
Stored size: 482 Bytes
Contents
module Que::Web::Viewmodels class Job < Struct.new( :args, :error_count, :job_class, :job_id, :last_error, :pg_backend_pid, :pg_last_query, :pg_last_query_started_at, :pg_state, :pg_state_changed_at, :pg_transaction_started_at, :pg_waiting_on_lock, :priority, :queue, :run_at) def initialize(job) members.each do |m| self[m] = job[m.to_s] end end def past_due?(relative_to = Time.now) run_at < relative_to end end end
Version data entries
9 entries across 9 versions & 1 rubygems