Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

We’re showing branches in this repository, but you can also compare across forks.

base fork: resque/resque
head fork: preplay/resque_from_master
Commits on Oct 04, 2011
Terence Lee hone fix build for 1.9.2 570c98b
Commits on Oct 09, 2011
Jonathan Dance wuputah send term first, then kill b545cc6
Jonathan Dance wuputah use system calls instead of process tree 37e6695
Jonathan Dance wuputah correct log messages for new behavior 11fd486
Commits on Oct 13, 2011
Terence Lee hone use keepalive thread in each worker ac9854f
Terence Lee hone make only 1 call to redis to prune dead workers 4cc3d7d
Terence Lee hone only unregister workers if they are still in the table 483d34d
Terence Lee hone actually calculate dead workers 9d422ed
Terence Lee hone use the worker id as the value fb1b16b
Terence Lee hone refactor keepalive thread code into a method e40c2bf
Terence Lee hone clean up keepalive thread when unregistering a worker if we can 654319c
Terence Lee hone prune workers before looking at overview page 186860a
Terence Lee hone remove log! for now from prune_dead_workers 0af938e
Terence Lee hone don't prune if there are no known workers 9b4fa02
Terence Lee hone make sure expire gets set on key caf263b
Terence Lee hone add heartbeat log 4a3c5c0
Terence Lee hone initialize keepalive thread 42a10b3
Terence Lee hone set expire to longer than interval 081fcda
Terence Lee hone expire uses integers 4de8b6e
Terence Lee hone log remaining ttl e73d138
Terence Lee hone use smaller expire window 9bfc92c
Terence Lee hone make keepalive thread have a longer interval
This thread should have a longer interval than the actual work check.
The expire should be set so we have ample time to set the next expire
before it's viewed as dead. I've gone with at least two times in case we
miss a heartbeat.
Terence Lee hone simulate dead workers in test properly c4bcec5
Terence Lee hone move prune_dead_workers into a thread
Moving this out of resque web so we don't need to load all the job
classes into the global namespace to run the web component. This uses a
key "last_prune" in redis.
Jonathan Dance wuputah stagger keepalive thread across all workers 3d79919
Jonathan Dance wuputah use to ensure only 1 tx succeeds 0633b9b
Jonathan Dance wuputah avoid some Time.to_s calls 419659c
Jonathan Dance wuputah simplify prune logic ac2d24d
Jonathan Dance wuputah allow env vars to override keepalive times 309690e
Jonathan Dance wuputah fix expire bug, more refactoring 43fa71c
Jonathan Dance wuputah remove WATCH, use SETNX instead e8609f2
Terence Lee hone use setex to replace this transaction c9e4855
Terence Lee hone use methods instead of constants 23c1ba0
Terence Lee hone add tests for heartbeat code path dc12803
Jonathan Dance wuputah refactor last_prune_expire 6bbfa37
Commits on Oct 14, 2011
Terence Lee hone move the ENV configuration of keepalive in rake dce2dc1
Terence Lee hone make kill child term time configurable a81ddbf
Commits on Nov 26, 2011
Ray Krueger raykrueger Correct the order of assert_equal when using arrays
Assert_equal should be in the order expected, actual. Each instance in this test was backwards
when using an array. Wich caused the "exected blah, but was blah" output to be backwards.
Ray Krueger raykrueger Fix for job failure plugins being run twice
After adding failure_hook handling to the method, which is called by
the worker upon failure, it is no longer necessary for the Job to call it's own
failure hooks. Currently the failure hooks are being called twice. Once by the
job itself, and then the error is rethrown, where the worker catches it and calls where the hooks are run again.

This patch simply removes the large begin/rescue block inside of the job.
Commits on Dec 01, 2011
Terence Lee hone Merge branch 'keepalive_pull_request' cdbf191
Terence Lee hone Merge branch 'send-term-before-kill'
Commits on Jan 19, 2012
Ray Krueger raykrueger Fix a race condition encountered with pruning dead workers
On a single machine, starting multiple workers at the same time would cause the same job to have
it's failure hook called multiple times. In this patch I'm only calling job.Fail when we've
successfully removed the worker from the :workers set.

Effectively this synchronizes the job fail
on the first worker to successfully remove itself from the set.
Commits on Mar 05, 2012
Sylvain Lemiere slemiere Merge remote-tracking branch 'raykrueger/master' 78c22e8
Sylvain Lemiere slemiere Merge remote-tracking branch 'hone/keepalive_pull_request'
Sylvain Lemiere slemiere Merge remote-tracking branch 'hone/heroku' c360c36
Something went wrong with that request. Please try again.