app/models/resque_instance.rb
# Return failed jobs either all or over a rage, as an Array of `FailedJob`.
# The failed queue is only accessible via indeces, but it does fill up
# FIFO, so the indeces are stable as long as no job is removed.
#
# start:: where to start, 0 is the default and is the first element
# count:: number of jobs to return, or `:all` for all jobs
Return failed jobs either all or over a rage, as an Array of `FailedJob`.
The failed queue is only accessible via indeces, but it does fill up
FIFO, so the indeces are stable as long as no job is removed.

: where to start, 0 is the default and is the first element
count:: number of jobs to return, or `:all` for all jobs
Return failed jobs either all or over a rage as an Array of ` FailedJob ` . The failed queue is only accessible via indeces but it does fill up FIFO so the indeces are stable as long as no job is removed . : where to start 0 is the default and is the first element count :: number of jobs to return or ` : all ` for all jobs
def jobs_failed(start=0,count=:all)
    count = @resque_data_store.num_failed if count == :all
    failed_payloads = @resque_data_store.list_range(:failed,start,count)
    failed_payloads = [failed_payloads] unless failed_payloads.kind_of?(Array)
    return [] if failed_payloads.nil?
    failed_payloads.map { |json|
      Resque.decode(json)
    }.each_with_index.map { |failed_job,index|
      FailedJob.new(
        id: index + start,
        queue: failed_job["queue"],
        payload: failed_job["payload"],
        exception: failed_job["exception"],
        error: failed_job["error"],
        backtrace: failed_job["backtrace"],
        worker: failed_job["worker"],
        failed_at: (Time.parse(failed_job["failed_at"]) rescue nil),
        retried_at: (Time.parse(failed_job["retried_at"]) rescue nil)
      )
    }
  end
def jobs_failed ( start = 0 , count = :all ) count = @resque_data_store . num_failed if count == :all failed_payloads = @resque_data_store . list_range ( :failed , start , count ) failed_payloads = [ failed_payloads ] unless failed_payloads . kind_of? ( Array ) return [ ] if failed_payloads . nil? failed_payloads . map { | json | Resque . decode ( json ) } . each_with_index . map { | failed_job , index | FailedJob . new ( id : index + start , queue : failed_job [ "queue" ] , payload : failed_job [ "payload" ] , exception : failed_job [ "exception" ] , error : failed_job [ "error" ] , backtrace : failed_job [ "backtrace" ] , worker : failed_job [ "worker" ] , failed_at : ( Time . parse ( failed_job [ "failed_at" ] ) rescue nil ) , retried_at : ( Time . parse ( failed_job [ "retried_at" ] ) rescue nil ) ) } end
Return failed jobs either all or over a rage, as an Array of `FailedJob`.
Return failed jobs either all or over a rage as an Array of ` FailedJob ` .
start
<not_specific>
count
<not_specific>