app/models/resque_instance.rb
# Return the number of running jobs that are running "too long" based on the `:stale_worker_seconds` configuration value
Return the number of running jobs that are running "too long" based on the `:stale_worker_seconds` configuration value
Return the number of running jobs that are running " too long " based on the ` : stale_worker_seconds ` configuration value
def running_too_long
    worker_ids = Array(@resque_data_store.worker_ids)
    return 0 if worker_ids.empty?
    workers_map(worker_ids).reject { |_,worker_info| 
      worker_info.nil? 
    }.select { |_,worker_info|
      WorkerStartTime.new(worker_info,@stale_worker_seconds).too_long?
    }.size
  end
def running_too_long worker_ids = Array ( @resque_data_store . worker_ids ) return 0 if worker_ids . empty? workers_map ( worker_ids ) . reject { | _ , worker_info | worker_info . nil? } . select { | _ , worker_info | WorkerStartTime . new ( worker_info , @stale_worker_seconds ) . too_long? } . size end
Return the number of running jobs that are running "too long" based on the `:stale_worker_seconds` configuration value
Return the number of running jobs that are running " too long " based on the ` : stale_worker_seconds ` configuration value