Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Resque workers failing silently with no logs or no debug information

$
0
0

I have a piece of code code which runs some method and I have put that method inside the self.perform as below

class StartWorker  @queue = :worker  def self.perform    puts "hello"    Parser.find_all_by_class_name("Parser").first.sites.each do |s|      site = Site.find(s.id)      parser = Parser.new(site)      parser.run    end  endend

If I comment the def self.perform and end of this and run the file it is correctly showing the desired results but when I try to put this as a background task by uncommenting the same It is failing silently into the resque panel showing nothing .and also with no outputs in the command prompt

I am queuing this from resque-scheduler, inside my resque_schedule.yml

start_worker:cron: "55 6 * * *"class: StartWorkerqueue: workerargs:description: "This job starts all the worker jobs"

I tried putting some simple puts statements inside the the def self.perform method to check whether the control is passing inside the method or not but it seems the control is not even passing inside the self.perform method

also I tried to load the rails environment and required resque inside it but of no useI have runned the bundle exec rake resque:work QUEUE='*' script for all the above before making any changes

I tried Resque.info inside the rails console it is showing like this ,

 {:working=>0, :queues=>1, :failed=>1, :environment=>"development", :servers=>["redis://localhost:6379/0"], :pending=>0, :processed=>1, :workers=>1}

Any Ideas how to overcome this?


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>