Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Have your resque workers process more that one job
Ruby
branch: master

This branch is 6 commits ahead of micha-de:master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
lib
test
.document
.gitignore
LICENSE
README.rdoc
Rakefile

README.rdoc

resque-multi-job-forks

Fast jobs have a very high fork overhead. This reduces the overhead of forking by running multiple jobs inside a single fork.

QUEUE=* MINUTES_PER_FORK=5 rake resque:work # fork lives for 5 minutes
QUEUE=* rake resque:work # one job per fork as usual

New hook: before_child_exit hook gets called right before the fork terminates:

Resque.before_child_exit do |worker|
  worker.log("#{worker.jobs_processed} were processed in this fork")
end

Copyright © 2010 Mick Staugaard. See LICENSE for details.

Something went wrong with that request. Please try again.