How do I clear stuck/stale Resque workers?

How do I clear stuck/stale Resque workers?

Add Comment


  • 3 Answer(s)

    Follow in redis-web:

    0 out of 10 Workers Working
    

    or

    Resque.workers.each {|w| w.unregister_worker}
    

    Answered on January 10, 2019.
    Add Comment

    Try this code on Resque workers:

    queue_name = "process_numbers"
    Resque.redis.del "queue:#{queue_name}"
    

    otherwise, 

    Resque::Worker.working.each {|w| w.done_working}
    

    Answered on January 10, 2019.
    Add Comment

    Rails resque gem installed,

    Resque.workers
    

    Returns a list of workers:

    #=> [#<Worker infusion.local:40194-0:JAVA_DYNAMIC_QUEUES,index_migrator,converter,extractor>]
    

    Prune_dead_workers:

    Resque.workers.first.prune_dead_workers
    

    Answered on January 10, 2019.
    Add Comment


  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.