Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
SqsJobs ======= SqsJobs is an Amazon SQS (http://aws.amazon.com/sqs/) backed job queue for Rails applications. SqsJobs is inspired by Delayed_Job (http://github.com/tobi/delayed_job) design. Install the plugin with script/plugin install git://github.com/mborromeo/sqs_jobs.git and follow the example for setup and jobs creation/consuming. Example ======= * Enter your AWS access key, secret key and queue name into config/sqsjobs.yml * Start writing your background jobs as this example (put this into app/models/jobs.rb) module Jobs class ComputeMassiveStuffForUser < Struct.new(:user_id) user = User.find(:user_id) user.calculate_recommendations end class SendMessageToUser < Struct.new(:user_id, :message) user = User.find(:user_id) user.send_message message end end * Add jobs to queue as follows: SqsJobs::Queue.enqueue(Jobs::ComputeMassiveStuffForUser.new(3)) or SqsJobs::Queue.enqueue(Jobs::SendMessageToUser.new(4, 'Hello from a separate process!')) * Start/stop/restart jobs workers with script/sqsjob start/stop/restart Copyright (c) 2009 [Marco Borromeo - http://marcoborromeo.com], released under the MIT license SqsJobs contains portions of code from Delayed_Job and Shopify_App plugins.