resque

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 anyone got a: Capistrano recipe to deploy workers (control number of workers, restarting ...

Resque or Gearman - choosing the right tool for background jobs

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 stores. To improve the response time, we want to process such requests asynchronously in the background. Our web application is being written ...

How to use resque-scheduler and resque-status together?

I have resque-scheduler working fine in a rails app. Now I need to be able to track status and remove jobs from the queue. I had a brief look at resque-status and, from what I saw, if I could get it to play nicely with resque-scheduler then it would be perfect. However, it seems rescue-status uses create which wraps enqueue and resque-s...

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 closed the connection unexpectedly. My best guess is that master resque process establishes connection to db (e.g. authlogic does that when...

Guide to migrate from delayed_job to resque?

Does anyone have or know of a guide for how to migrate from Delayed Job to Resque? I can't find any on Google and figure I must not be the first one doing this. Just a general list of changes that need to made and things to watch out for would be great. ...

Resque Runtime Error at /workers: wrong number of arguments for 'exists' command

I'm having a runtime errror when i'm looking at the "workers" tab on resque-web (localhost). Everything else works. Edit: when this error occurs, i also have some (3 or 4) unknown workers 'not working'. I think they are responsible for the error but i don't understand how they got here. It only happens when i start the workers from God ...

Connect resque to other key-value DB than redis?

I just read a little about resque here and how you use redis as a "advanced key-value store" for the jobs. As you might know you can use resque on multiple machines to process the jobs: Workers can be given multiple queues (a "queue list") and run on multiple machines. In fact they can be run anywhere with network access to the Redi...

Resque: Slow worker startup and Forking

I'm currently moving my application from a Linode setup to EC2. Redis is currently installed on a remote instance with various worker instances interacting with the queue. Thats all going fantastic. My problem is with the amount of time it takes for a worker to be 'instantiated' and slow forking. Starting a worker will usually take ...

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 i18n gem is available, it makes use of it. Recently I upgraded my gems and now have ver...

Why I'm getting stack level too deep while triggering a job using resque-status?

Here is the stack trace which appears on resque-web interface: http://gist.github.com/396893 There you can check some gem versions that I was using. Now I have made some upgrades trying to solve the problem, here are the current gem versions: redis (2.0.3) redis-namespace (0.5.0) redisk (0.2.1) resque (1.9.5) resque-scheduler (1.9.2) re...

How to change the default sleep time (5s) of resque?

I'm using Rails with resque. The "sleep time" is the seconds of a worker sleeping after it can't find any new tasks. The worker is created by QUEUE=* rake environment resque:work, and the default value is 5s, I can't to change it to 2s. I have searched for this problem for several hours, somebody can help me? ...

How to set expire time when add a task to resque?

I'm using Rails with Resque. I know the command of redis-cli is: expire key 100 But I don't know how to set the expire time when adding a task to resque, what should I do? ...

Odd reload! behavior in console when creating Resque jobs

I am trying to figure out an odd issue I am seeing where a reload! in console appears to solve an issue. I have an AccountObserver class that should run an after_create method whenever a new Account instance is created. The after_create method creates a Resque job. When I first load console, create a new Account instance results in ...

What's the best way to write Resque-related specs in RSpec?

What's the best way to write Resque-related specs in RSpec without stubbing the former? We currently use the following helper: @dir = File.dirname(File.expand_path(__FILE__)) def start_redis `redis-server #{@dir}/redis-test.conf` Resque.redis = "localhost:9736" end def stop_redis `rm -f #{@dir}/dump.rdb` pid = `ps -A -o pid,c...

How to force heroku to use JSON/ext over JSON/pure.

I've hit a stumbling block and I'm not sure how to proceed. I'm trying to get resque working with redis to go on heroku, I have it all working locally, but when I push to my staging environment and try to queue a job I get the following exception: TypeError: wrong argument type JSON::Pure::Generator::State (expected Data) On my local m...

Net::SSH connection fails from inside resque job

I have an app that sets creates EC2 instances - I have a resque task that will configure the server (via ssh) once it's up and running: Net::SSH.start(server.dns_name, 'root', :keys => ['~/.ssh/testkey.pem'], :paranoid => false, :verbose => :debug) do |ssh| result = ssh.exec!("ls -l") puts result end I get an...

Resque Scheduler on Heroku... Do it remotely ?

Hi! I'm adding Resque-Scheduler in my app on Heroku So... I need ONE alone and distinct worker acting as the scheduler and many doing the jobs. This is how I've done it : I've a distinct Heroku App which does nothing but has 1 resque-scheduler worker, running 24/7, adding Resque tasks to the Redis DB of the "distant" main App. (I do t...

Resque plugin's resque-web is not running.

Hi, I am using Resque and Resque scheduler,but when I am starting resque-web it is not running. And prompting an error " bash: resque-web: command not found". So how to start this resque-web on my local server. Thanks in advance. ...

Resque Scheduler plugin for the scheduled job not working.

Hi, I am using this plugin for scheduled job.But it is not working. I am confused about some points,Should I need to create the Job class and set their name in to schedule file?When testing it then,Should I run the rescue scheduler and Resque worker both or only one of them. Thanks in advance. ...

Problem using Resque, Rails 3 and Active-Recored

I have this Class which response to perform to be run by "Resque", I have an error at this line recipient.response = response.body wich is undefined method response=' for #<Hash:0x00000003969da0> I think that because the worker and ActiveRecord can't work together. P.S I already loaded my environment and this class placed in lib directo...