Questions tagged [resque]

Resque (pronounced like "rescue") is a Redis-backed library for creating background jobs, placing those jobs on multiple queues, and processing them later.

Background jobs can be any Ruby class or module that responds to perform. Your existing classes can easily be converted to background jobs or you can create new classes specifically to do work. Or, you can do both.

Resque is heavily inspired by DelayedJob (which rocks) and comprises three parts:

A Ruby library for creating, querying, and processing jobs A Rake task for starting a worker which processes jobs A Sinatra app for monitoring queues, jobs, and workers. Resque workers can be distributed between multiple machines, support priorities, are resilient to memory bloat / "leaks," are optimized for REE (but work on MRI and JRuby), tell you what they're doing, and expect failure.

Resque queues are persistent; support constant time, atomic push and pop (thanks to Redis); provide visibility into their contents; and store jobs as simple JSON packages.

The Resque frontend tells you what workers are doing, what workers are not doing, what queues you're using, what's in those queues, provides general usage stats, and helps you track failures.

For the backstory, philosophy, and history of Resque's beginnings, please see the blog post.

1074 questions
142
votes
16 answers

How do I clear stuck/stale Resque workers?

As you can see from the attached image, I've got a couple of workers that seem to be stuck. Those processes shouldn't take longer than a couple of seconds. I'm not sure why they won't clear or how to manually remove them. I'm on Heroku using Resque…
Shpigford
  • 24,748
  • 58
  • 163
  • 252
133
votes
2 answers

Resque vs Sidekiq?

I am currently using Resque for my background process but recently I heard a lot of huff-buff about sidekiq. Could anybody compare/differentiate? In particular I would like to know is there a way to monitor programmatically whether a job is…
Bhushan Lodha
  • 6,824
  • 7
  • 62
  • 100
65
votes
3 answers

Programmatically get the number of jobs in a Resque queue

I am interested in setting up a monitoring service that will page me whenever there are too many jobs in the Resque queue (I have about 6 queues, I'll have different numbers for each queue). I also want to setup a very similar monitoring service…
randombits
  • 47,058
  • 76
  • 251
  • 433
64
votes
3 answers

delayed_jobs vs resque vs beanstalkd?

Here is my needs: Enqueue_in(10.hours, ... ) (DJ syntax is perfect.) Multiply workers, concurrently. (Resque or beanstalkd are good for this, but not DJ) Must handle push and pop of 100 jobs a second. (I will need to run a test to make sure, but I…
rafamvc
  • 8,227
  • 6
  • 31
  • 34
42
votes
7 answers

How to destroy jobs enqueued by resque workers?

I'm using Resque on a rails-3 project to handle jobs that are scheduled to run every 5 minutes. I recently did something that snowballed the creation of these jobs and the stack has hit over 1000 jobs. I fixed the issue that caused that many jobs to…
Kibet Yegon
  • 2,763
  • 2
  • 25
  • 32
39
votes
4 answers

How to deploy resque workers in production?

The GitHub guys recently released their background processing app which uses Redis: http://github.com/defunkt/resque http://github.com/blog/542-introducing-resque I have it working locally, but I'm struggling to get it working in production. Has…
Brian Armstrong
  • 19,707
  • 17
  • 115
  • 144
37
votes
5 answers

Rescue : Connection refused - Unable to connect to Redis on localhost:6379

I have followed the instructions to install resque, but now when I try to spawn a worker with this command I get a connection error: $ QUEUE=mailer rake environment resque:work --trace this is the error that I get: Connection refused - Unable to…
Steven
  • 565
  • 2
  • 5
  • 11
31
votes
1 answer

Error with resque-web: Couldn't get a file descriptor referring to the console

I'm trying start resque-web, but this error occurs: [Sun Mar 06 05:27:48 +0000 2011] Starting 'resque-web'... [Sun Mar 06 05:27:48 +0000 2011] trying port 8281... Couldn't get a file descriptor referring to the console This error occurred with…
Fabrício
  • 1,060
  • 1
  • 12
  • 17
31
votes
3 answers

How can I delete specific jobs from Resque queue without clearing the whole queue?

I'm using Resque workers to process job in a queue, I have a large number of jobs > 1M in a queue and have some of the jobs that I need to remove ( added by error). Crating the queue with the jobs was not an easy tasks, so clearing the queue using…
Rami
  • 559
  • 1
  • 6
  • 9
30
votes
4 answers

Resque, Devise and admin authentication

Using Resque and Devise, i have roles for User, like: User.first.role #=> admin User.last.role #=> regular I want to setup an authentication for Resque. So, inside config/routes.rb i have: namespace :admin do mount Resque::Server.new, :at =>…
There Are Four Lights
  • 1,406
  • 3
  • 19
  • 35
27
votes
1 answer

Inspect and retry resque jobs via redis-cli

I am unable to run the resque-web on my server due to some issues I still have to work on but I still have to check and retry failed jobs in my resque queues. Has anyone any experience on how to peek the failed jobs queue to see what the error was…
Horacio
  • 2,727
  • 5
  • 26
  • 29
27
votes
2 answers

Node.js workers/background processes

How can I create and use background jobs in node.js? I've come across two libs (node-resque and node-worker) but would like to know if there's something more used.
donald
  • 23,587
  • 42
  • 142
  • 223
24
votes
2 answers

Redis with Resque and Rails: ERR command not allowed when used memory > 'maxmemory'

When using redis, it gives me the error: ERR command not allowed when used memory > 'maxmemory' The info command reveals: redis 127.0.0.1:6379>…
kmurph79
  • 1,192
  • 3
  • 13
  • 28
23
votes
8 answers

Run resque in background

I have a working rails app with a resque queue system which works very well. However, I lack a good way of actually demonizing the resque workers. I can start them just fine by going rake resque:work QUEUE="*" but I guess it's not the point that you…
Markus
  • 2,526
  • 4
  • 28
  • 35
23
votes
3 answers

How to bridge the testing using Resque with Rspec examples?

I've a confusion while implementing Resque in parallel with Rspec examples. The following is a class with expensive method .generate(self) class SomeClass ... ChangeGenerator.generate(self) ... end After implementing…
millisami
  • 9,931
  • 15
  • 70
  • 112
1
2 3
71 72