Class: Form526JobStatus

Inherits:
ApplicationRecord show all
Defined in:
app/models/form526_job_status.rb

Constant Summary collapse

FAILURE_STATUSES =
{
  non_retryable_error: 'non_retryable_error',
  exhausted: 'exhausted'
}.freeze
STATUS =
{
  try: 'try',
  success: 'success',
  retryable_error: 'retryable_error',
  pdf_not_found: 'pdf_not_found'
}.merge(FAILURE_STATUSES).freeze

Instance Method Summary collapse

Methods inherited from ApplicationRecord

descendants_using_encryption, lockbox_options, #timestamp_attributes_for_update_in_model, #valid?

Instance Method Details

#success?Boolean

Returns:

  • (Boolean)


21
22
23
# File 'app/models/form526_job_status.rb', line 21

def success?
  status == STATUS[:success]
end

#unsuccessful?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'app/models/form526_job_status.rb', line 25

def unsuccessful?
  !success?
end