Guest User

Untitled

a guest
Mar 22nd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. $ rails c
  2. Loading development environment (Rails 3.1.3)
  3. 1.9.3p0 :002 > Resque::Worker.working.each{|w| w.done_working}
  4.  
  5. $ redis-cli FLUSHDB
  6. $ redis-cli FLUSHALL
  7.  
  8. FLUSHDB - Removes data from your connection's CURRENT database.
  9. FLUSHALL - Removes data from ALL databases.
  10.  
  11. Jobs in queue aren't processing, try this:
  12. rake resque:work QUEUE='*'
  13.  
  14. Rails console:
  15. [14] pry(#<RSpec::Core::ExampleGroup::Nested_1::Nested_2>)> Resque.info
  16. => {:pending=>0,
  17. :processed=>1,
  18. :queues=>1,
  19. :workers=>0,
  20. :working=>0,
  21. :failed=>1,
  22. :servers=>["redis://localhost:6379/0"],
  23. :environment=>"test"}
  24.  
  25. # view queues
  26. [15] pry(#<RSpec::Core::ExampleGroup::Nested_1::Nested_2>)> Resque.queues
  27. => ["remote_content"]
  28.  
  29. # to work queue
  30. [16] pry(#<RSpec::Core::ExampleGroup::Nested_1::Nested_2>)> Resque::Worker.new('remote_content', {}).work
  31.  
  32. # to work 1 job in queue(if 3 jobs are pending, only 1 will complete)
  33. [4] pry(#<RSpec::Core::ExampleGroup::Nested_1::Nested_2>)> Resque::Worker.new('remote_content', {}).process
  34. => 1
Add Comment
Please, Sign In to add comment