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
0
votes
1 answer

Is it possible to import helpers into a Resque worker?

My worker is sending out an email. And the email requires helpers. For some reason those helpers are inaccessible within the email if Resque handles it. How can I import the Helpers? Would I do it through the partial itself, the controller, or the…
Trip
  • 26,756
  • 46
  • 158
  • 277
0
votes
1 answer

Resque on Heroku Cedar not working

I've been trying to figure what the issue is for couple days now but no luck, I'm running Rails 3.1.3 on Heroku Cedar with Unicorn and using Resque 1.20 for background jobs. Redis add-on as been added and REDISTOGO_URL set, I have resque.rb…
user1447222
  • 73
  • 1
  • 5
0
votes
1 answer

Ruby (Rack) application could not be started error message

my ruby application was working fine until earlier this week, the system crashed, and now I get an error message on the page... Error message: Failed to connect to a master node at localhost:27017 (Mongo::ConnectionFailure) Exception…
elixireu
  • 255
  • 3
  • 15
0
votes
1 answer

how to make resque process jobs ordered

I have a queue which process some 'Products' thar are sent via JSON. I receive them in a order like {1, 2, 3, 4}, but resque processed them in {1, 3, 2, 4}. It is pretty important that resque process they ordered because a old version of Product can…
Luiz E.
  • 6,769
  • 10
  • 58
  • 98
0
votes
1 answer

Rails Resque change worker limit?

I have Rails app with some Resque workers. It seems that I have a limit of 2 workers running simultaneously (app runs on EC2 with Apache in production). Is there any way I can raise that limit? EDIT: I have maxclients 0 in redis.conf I can start…
Stpn
  • 6,202
  • 7
  • 47
  • 94
0
votes
1 answer

Ruby On Rails - Resque Scheduler - More frequently between certain hours

I'm new to rails scheduler but have managed to setup a task. I wonder if it's possible to set it up so it do a certain task more frequently between working hours than the other hours? Like. Between 07:30 - 21: 00 repeat the task every 2…
Philip
  • 6,827
  • 13
  • 75
  • 104
0
votes
1 answer

Necessity of cloning classes for background processes running through rake?

I have a resque worker class which works with ActionMailer and another that works with Mail directly. Here's a short example: class NotificationWorker def self.perform(id) Mailer.delivery_method.settings = { # custom settings here …
pdu
  • 10,295
  • 4
  • 58
  • 95
0
votes
1 answer

task does not get 'failed' when using rescue

I have a task like this... def self.perform(parsed_json) do_hard_work use_faye_to_push_status rescue => exception use_faye_to_push_error end but, when I use the 'rescue', the task doesn't enter on the failed task list. Is there a way to, even…
Luiz E.
  • 6,769
  • 10
  • 58
  • 98
0
votes
1 answer

Carrierwave/Paperclip and Resque - Sharing across several computers

I am working on a rails application that requires files to be uploaded to my server and then have resque workers (running on several other computers) use those files to do some tasks. I have my workers all set to do the task but I can't seem to find…
0
votes
1 answer

Resque and redis server not playing well with each other

I have install the redis server using these commands, wget http://download.redis.io/redis-stable.tar.gz xvzf redis-stable.tar.gz cd redis-stable make make test # to test everything is working out well or not after this I navigate to the…
Mansoor Elahi
  • 941
  • 1
  • 9
  • 19
0
votes
2 answers

Undefined method - NOMethod error 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__) +…
Mansoor Elahi
  • 941
  • 1
  • 9
  • 19
0
votes
1 answer

Is typhoeus safe to use with activerecord? resque?

Is typhoeus safe to use with activerecord? resque? I've poked around in the source and googling here and there and I can't make heads or tails of it. I guess what I really want to know is, are the response callbacks run one at a time or in parallel?…
chrismealy
  • 4,830
  • 2
  • 23
  • 24
0
votes
1 answer

Rails - starting background process (Resque) from another process

I have an applications that uses Resque for background processes. So I have -/app/workers/dataCollector.rb and in controller: def new @my_model = MyModel.new(params[:]) Resque.enqueue(DataCollector, @my_model.id) end I want to add another…
Stpn
  • 6,202
  • 7
  • 47
  • 94
0
votes
1 answer

Not able to set meta data on a resque-status hash

As per the resque-status home page on GitHub I should be able to pass back data from a job. For some reason this does not seem to be working for me. If anyone else has encountered this problem and worked around it I would like to know how. I am…
Moiz Raja
  • 5,612
  • 6
  • 40
  • 52
0
votes
1 answer

how to store Tmail object in resque

I know we cant keep objects directly in redis queue. I converted it to string using Marsal.dump(tmail_object) while fetching i am using Marshal.load(tmail_object) but the object is changing i guess. I get empty email when i send email using that…
Sharath B. Patel
  • 401
  • 1
  • 6
  • 15
1 2 3
71
72