OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
openproject/app/models/delayed/job/status.rb

20 lines
525 B

module Delayed
class Job
class Status < ApplicationRecord
self.table_name = 'delayed_job_statuses'
belongs_to :reference, polymorphic: true
belongs_to :job, class_name: '::Delayed::Job'
enum status: { in_queue: 'in_queue',
error: 'error',
in_process: 'in_process',
success: 'success',
failure: 'failure' }
def self.of_reference(reference)
where(reference: reference)
end
end
end
end