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/modules/job_status/app/models/job_status/status.rb

21 lines
443 B

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