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.

resque
Filter by
Sorted by
Tagged with
143 votes
16 answers
64k views

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 ...
Shpigford's user avatar
  • 25.1k
133 votes
2 answers
46k views

Resque vs Sidekiq? [closed]

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 ...
Bhushan Lodha's user avatar
65 votes
3 answers
30k views

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 ...
randombits's user avatar
  • 47.8k
64 votes
3 answers
24k views

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 ...
rafamvc's user avatar
  • 8,277
42 votes
7 answers
36k views

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....
Kibet Yegon's user avatar
  • 2,813
39 votes
4 answers
24k views

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 ...
Brian Armstrong's user avatar
37 votes
5 answers
116k views

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 ...
Steven's user avatar
  • 565
31 votes
1 answer
10k views

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 ...
Fabrício's user avatar
  • 1,080
31 votes
3 answers
18k views

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 ...
Rami's user avatar
  • 569
30 votes
4 answers
7k views

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: ...
There Are Four Lights's user avatar
27 votes
1 answer
20k views

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 ...
Horacio's user avatar
  • 2,745
27 votes
2 answers
15k views

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's user avatar
  • 23.7k
24 votes
2 answers
17k views

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> info redis_version:2.4.10 redis_git_sha1:...
kmurph79's user avatar
  • 1,192
23 votes
3 answers
9k views

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(...
millisami's user avatar
  • 10.1k
23 votes
8 answers
17k views

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 ...
Markus's user avatar
  • 2,554
22 votes
1 answer
7k views

Rails: Exception in after_create stopping save

Simple question. I have a ActiveRecord model that I want to perform post processing on AFTER the record is saved. So in the model I have a queue_for_processing method that sticks a job onto my Resque ...
James P McGrath's user avatar
22 votes
2 answers
8k views

What is the proper way to setup and use php-resque?

I am trying to use php-resque to queue and execute ffmpeg conversions on my server. I understand broadly how it should work, but I am having some trouble with the details and can not find any ...
user avatar
21 votes
5 answers
8k views

Gems/Services for autoscaling Heroku's dynos and workers

I want to know if there are any good solutions for autoscaling dynos AND workers on Heroku in a production environment (probably a different solution for each of those, as they are pretty unrelated). ...
FernandoH's user avatar
  • 855
20 votes
5 answers
8k views

Rails Resque workers fail with PGError: server closed the connection unexpectedly

I have site running rails application and resque workers running in production mode, on Ubuntu 9.10, Rails 2.3.4, ruby-ee 2010.01, PostgreSQL 8.4.2 Workers constantly raised errors: PGError: server ...
gc.'s user avatar
  • 203
19 votes
3 answers
20k views

deploying redis to heroku unable to connect

ive been trying to get resque to work with heroku. i can successfully get it to work in development mode, however when i try pushing to heroku i get Errno::ECONNREFUSED (Connection refused - Unable ...
Sasha's user avatar
  • 3,281
19 votes
2 answers
6k views

How to check Resque worker status to determine whether it's dead or stale

The default resque web interface says that I have 5 of 7 workers working. I don't understand how this could be happening. I'm on heroku, so when my dyno restarts, it should spin down existing dynos ...
boo-urns's user avatar
  • 10.2k
19 votes
2 answers
4k views

How to test retries and failures in resque-retry and Rails 4?

I am trying to write a spec that tests the retry functionality of resque-retry and I can not seem to get the tests to hit the binding.pry's correctly. Is there a way to test this functionality using ...
Chris Hough's user avatar
  • 3,479
16 votes
2 answers
11k views

Resque multiple workers in development mode

Hi is it possible to run multiple Resque workers simultaneously in development? I found this bit of code, but not sure if it will work and how.. http://pastebin.com/9GKk8GwR So far I am using the ...
Stpn's user avatar
  • 6,344
16 votes
1 answer
6k views

Resque.enqueue failing on second run

I am trying to port an app from Rails 3.0.3 to Rails 3.1rc... I don't think I've missed out anything, in terms of configuration. The process works perfectly in Rails 3.0.X and not in 3.1rc. In ...
Christian Fazzini's user avatar
16 votes
1 answer
4k views

How to ignore some calls to the same method with different argument in Rspec?

This is my scenario: After updating an AR object, it fires a bunch of background jobs with Resque. In my specs I’m mocking the call to Resque#enqueue, something in the lines of: it 'should be ...
rdavila's user avatar
  • 370
16 votes
5 answers
8k views

Recovering cleanly from Resque::TermException or SIGTERM on Heroku

When we restart or deploy we get a number of Resque jobs in the failed queue with either Resque::TermException (SIGTERM) or Resque::DirtyExit. We're using the new TERM_CHILD=1 RESQUE_TERM_TIMEOUT=10 ...
Brian Armstrong's user avatar
14 votes
2 answers
6k views

Best Ruby on Rails Architecture for Image Heavy App

I'm building an application that allows for large amounts of photo uploads at once, and wanted to know what the best setup would be to tackle this. This is what I am using so far: Jquery File Upload:...
Jonathan Sutherland's user avatar
14 votes
4 answers
7k views

Postgres error on Heroku with Resque

I don't know enough Postgres to understand the message. PG::Error: SSL error: decryption failed or bad record mac : SELECT a.attname, format_type(a.atttypid, a.atttypmod), d.adsrc, a.attnotnull FROM ...
Arkan's user avatar
  • 6,206
14 votes
2 answers
10k views

Resque jobs, how to stop running job

My Resque worker class class WebWorker @queue = :jobs_queue def self.perform(id) //bunch of code here end end I remove from the queue a certain job like this Resque.dequeue(WebWorker,id) ...
Aydar Omurbekov's user avatar
14 votes
0 answers
2k views

Resque vs. Sidekiq [closed]

I'm working on a project with a friend where we've been using Resque for processing various commands from data input inside our rails application on a minute to minute basis. We've been messing ...
James Newton's user avatar
13 votes
2 answers
5k views

How to stop God from leaving stale Resque worker processes?

I'm trying to understand how to monitor the resque worker for travis-ci with god in such a way that stopping the resque watch via god won't leave a stale worker process. In the following I'm talking ...
svenfuchs's user avatar
  • 683
13 votes
4 answers
4k views

Run rails code after an update to the database has commited, without after_commit

I'm trying to battle some race cases with my background task manager. Essentially, I have a Thing object (already exists) and assign it some properties, and then save it. After it is saved with the ...
Brian's user avatar
  • 7,054
12 votes
2 answers
5k views

How can I run Rails background jobs on AWS Elastic Beanstalk?

I just started to use AWS Elastic Beanstalk with my rails app and I need to use the Resque gem for background jobs. However, despite all effort to search how to run Resque worker on Elastic Beanstalk, ...
Omer Temel's user avatar
12 votes
2 answers
3k views

Sending Devise emails through Resque

I'm trying to send Devise emails through Resque. Regular emails are getting sent through Resque just fine. And Devise emails are sent just fine, but not Devise emails through Resque. I get "Could not ...
99miles's user avatar
  • 11.1k
12 votes
2 answers
3k views

How to get resque-web to work on Heroku?

On my dev machine, I am able to type resque-web in a console and it launches a new tab on my browser which shows the Resque interface. On Heroku, Cedar stack, how can I do the same thing? i.e. I ...
Christian Fazzini's user avatar
12 votes
1 answer
3k views

Resque or Gearman - choosing the right tool for background jobs [closed]

We are developing a web application wherein with about 50% of write requests, we end up pushing data to multiple data stores and inserting and updating significant number of records in those data ...
Nishith's user avatar
  • 268
11 votes
2 answers
8k views

How to debug resque job in rails application

How can I debug a resque job in rails application? I just want to write some info in a log file from self.perform function. I have written this system("echo sos >> /home/maruf/Desktop/log.txt") in ...
Quazi Marufur Rahman's user avatar
11 votes
1 answer
5k views

Rails - ActionDispatch::Http::UploadedFile in background job

I'm using a similar idea as in the importing csv and excel Railscast but as the standard code in that episode takes some time to process (uses ActiveRecord to create a new record for each row in the ...
Marklar's user avatar
  • 1,257
11 votes
3 answers
9k views

Ruby - Exception occured: [Mysql2::Error] closed MySQL connection

I have a Rails application now only runs internally, so there's not so much visits right now. And there're two resque worker running hardly to fetch data from the web and inserts into a mysql database,...
larryzhao's user avatar
  • 3,193
11 votes
3 answers
4k views

What's the difference between running rake task in background vs. using gem like Delayed Job, Resque, or Sidekiq?

I need to implement some background processing to 1) send emails, 2) do some API calls. And, whatever system I use, I'll also be combining with some kind of cron scheduler (Whenever likely). I'm ...
james's user avatar
  • 3,949
10 votes
4 answers
4k views

Resque worker failing with PostgreSQL server

I've managed to set up my workers and they used to execute without issue (in development) but now they don't in either production or development (I'm guessing after changing from SQlite3 to PostgreSQL)...
Simpleton's user avatar
  • 6,345
10 votes
4 answers
4k views

Have Rails 2.3.x ignore the i18n gem

I have a Rails 2.3.5 project that uses the localization features of Rails. I also happen to have Rails 3 beta installed (which depends on the i18n gem). Rails 2.3.5 will happily handle localization on ...
Jared's user avatar
  • 2,438
10 votes
1 answer
1k views

GitHub's Redis and Resque failure behavior?

Anyone have any insight into how GitHub deals with the potential failure or temporary unavailability of a Redis server when using Resque? There are others that seem to have put together semi-...
Michael Wasser's user avatar
10 votes
0 answers
877 views

Resque job fails with "Broken pipe @ io_write - <STDOUT>" (Errno::EPIPE) when writing to STDOUT

We've been running background jobs using Resque for several years now but recently started getting failed jobs with the following error message and I'm not sure what changed with our code or our ...
Dan's user avatar
  • 455
9 votes
3 answers
14k views

Find specific job in resque queue

In my application, I'm using Resque to resize images. If an image is in the resizing queue, I want to show a "resizing image" icon. This means that I need to be able to find all current jobs ...
Ronze's user avatar
  • 1,564
9 votes
3 answers
19k views

How to run "rake resque:work QUEUE=*" when Rails server boots?

I have installed resque correctly, but to process all queues I need to run rake resque:work QUEUE='*' The problem is that I need to keep the terminal window opened, otherwise resque:work won't works....
sparkle's user avatar
  • 7,264
9 votes
1 answer
2k views

Background workers view communication in rails app

Lets say I have a blog application with posts. After creating a post a worker is created to handle some background operations. My case is that after submitting a post form I want to display some kind ...
pkurek's user avatar
  • 606
9 votes
3 answers
4k views

Resque-Scheduler not working with ActiveJob in Rails 4.2

Has anyone been able to get scheduled jobs to work in Rails 4.2? I am using resque, and I am attempting to use resque-scheduler to schedule jobs. I have a schedule that get loaded and the scheduler ...
luis.madrigal's user avatar
9 votes
3 answers
4k views

Resque: one worker per queue

I currently have a Rails 3.0 project, with Ruby 1.9.2 and Resque. My application has multiple worker classes and multiple queues, that are dynamically created (during runtime). Also, there are ...
Henrique Zambon's user avatar
9 votes
3 answers
5k views

scheduling dynamic jobs in resque scheduler

I'm trying to test out scheduling jobs in future using rails 3 and resque scheduler: Following is the code I'm using but I'm getting NoMethodError set_schedule. Resque.set_schedule("1", { :cron =...
ed1t's user avatar
  • 8,599

1
2 3 4 5
22