2

I have resque and resque-scheduler running on my local machine.

Can I test whether my jobs is working or by copy and paste following code in rails console?

Resque.enqueue_in 3.seconds, SnippetHighlighter

this is my SnippetHighlighter.rb code

def self.perform
  puts "it works
end

anyone has same experience? thanks

Kris MP
  • 2,305
  • 6
  • 26
  • 38

1 Answers1

0

Make sure your /config/environments/development.rb has resque as queue adapter instead of inline:

config.active_job.queue_adapter = :resque

Open one terminal and start resque:

VERBOSE=1 QUEUE=* rake environment resque:work

Open a second terminal and start scheduler:

VERBOSE=1 rake resque:scheduler
Rael Gugelmin Cunha
  • 3,327
  • 30
  • 25