Resque jobs, how to stop running the 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) But I would like to stop running job and restart, how would I d

Resque-scheduler loading schedules but not queuing them

When I run rake resque:scheduler RAILS_ENV=production I get the following output: 2013-09-19 18:16:16 Reloading Schedule 2013-09-19 18:16:16 Loading Schedule 2013-09-19 18:16:16 Scheduling aa_job 2013-09-19 18:16:16 Scheduling bb_job 2013-09-19 18:16

How can I programmatically update the Rescue program?

So I'm looking into adding some functionality in my app which will allow users to schedule certain tasks. A brief search brought Resque and Resque-Scheduler to my attention. However, I'm wondering if it will let me change scheduled tasks on the fly.

How can I inspect the last failed job in Resque?

I know it returns a hash, but its strange how the syntax goes.. I'm trying to find out what the last one is. If I do this :[:failed] # -> 68 So assuming there's 68 failed jobs, when I do this : Resque::Failure.all() It only returns one jo

How can I use ruby-debugger in a job?

I'm looking for a command to start a worker process so that inside of the job's perform method I can call debugger and have control thrown to the command prompt.instead of calling Resque.enqueue(Archive,, branch) (from the resque readme), I t

Kill all pid files in a folder

I have a folder that is filled with .pid files. Each has the PID for a resque worker. How can I kill every PID in that folder from the command line?According to the docs it says to use: ps -e -o pid,command | grep [r]esque-[0-9] | cut -d ' ' -f 1 | x

Delay render_to with Resque

I am trying to replicate the setup Ryan Bates has in this railscast on Resque, where he queues up a third party service web request and then updates his results page with results. I am designing an application that will interact with another Rails ap

Rails Resque.enqueue custom environment does not create jobs

I'm using Resque for a couple of asynchronous jobs. I've set up a custom environment integration which is a clone of my production environment. However, my Resque jobs do not get added to Redis in my integration environment. For example, if I run the

Method not defined - Error NOMethod with Resque gem

I am trying to generate xml file as a background task using resque gem here is the class which generates xml file .... ENV['RAILS_ENV'] = ARGV.first || ENV['RAILS_ENV'] require File.expand_path(File.dirname(__FILE__) + "/../../config/environment"

Resolve 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.. So far I am using the standard bundle exec env rake resque:work QUEUE='*' re

Find a specific job in the queue of resque

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 relating to a specific model ID in the queue. Right no

Significant attribute calculations with a queuing system

For all of the following assume these: rails v3.0 ruby v1.9 resque We have 3 models: Product belongs_to :sku, belongs_to :category Sku has_many :products, belongs_to :category Category has_many :products, has_many :skus When we update the product (le

Heroku console command error

I'm reluctant to ask this but I can't figure it out. When I run the following command in heroku console I get a syntax error. Why? QUEUE='*' rake jobs:work Error: SyntaxError: compile error /home/heroku_rack/lib/console.rb:150: syntax error, unexpect

Solutions for the nervousness of redness

Since clustered Redis is still in the works, are there mechanisms in Resque that automatically will failover to a Redis slave should the master ever go down?I don't think so. However, you can implement the master election mechanism yourself quite eas

Solution for background work on Heroku?

I've used Delayed Job on Heroku's older stacks (Aspen and Bamboo), but with their new(ish) Cedar stack, I'd like to try something more efficient. The specific background jobs I'm performing are API calls to different carriers (UPS, FedEx, USPS, etc e

How to mix tasks in a Resque queue?

I have a queue named check_integrity and lots of jobs in it. When i run a worker for it it takes jobs first in first out order. Is it possible to shuffle the jobs in that particular queue? I need the worker to take jobs randomly. Please help. Thanks.

Perform rake tasks to start Resque workers on Heroku

So I have Resque and redis to go set up on Heroku and this is what my resque.rake file looks like: require 'resque/tasks' task "resque:setup" => :environment do ENV['QUEUE'] = '*' end desc "Alias for resque:work (To run workers on Heroku

Can you use Redis alongside Resque?

I'm using Redis To Go on Heroku, and I'd like to use it to store some data alongside Resque jobs, much like I can store DelayedJobs in the same Postgres database as the rest of my model data. Is this possible? Care to explain briefly how Resque store

ruby resque without load rail environment

I have a resque worker which works great but is just too slow. The main reason for this is I'm using activerecord and having to load the entire environment which takes at least 10-20 seconds just to load up (I don't keep a running worker at all times

Heroku Cedar - no static assets for the front mounted Resque

I have a simple Rails app deployed to the Heroku Cedar stack. The app uses Resque and the Resque Sinatra front-end app is mounted so I can monitor the queue: # routes.rb ... mount Resque::Server, :at => "/resque" This works great, but when de

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 it's own (without i18n installed), however if the