Permalink
Find file
Fetching contributors…
Cannot retrieve contributors at this time
executable file 27 lines (22 sloc) 560 Bytes
#!/usr/bin/env ruby
require 'rubygems'
require 'resque'
require 'resque/status'
require 'irb'
require './basic_job.rb'
require './progress_job.rb'
puts "*** Resque Jobs ***"
puts "There are currently #{Resque.workers.size} workers running"
puts
puts "Try something:"
puts
puts '---- BASIC JOB '.ljust(80, '-')
puts "Resque.enqueue(BasicJob, :id => 1)"
puts "Resque.peek :default"
puts
puts '---- JOB WITH PROGRESS '.ljust(80, '-')
puts "job_id = ProgressJob.create(:id => 2)"
puts "Resque::Status.get(job_id).inspect"
puts ''.ljust(80, '-')
puts
IRB.start