Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: sapient/delayed_job
base: master
...
head fork: guns/delayed_job
compare: delayed_job_daemon
Checking mergeability… Don't worry, you can still create the pull request.
Commits on Aug 17, 2010
guns Add task jobs:daemon:start, which spawns a simple forking daemon that…
… actually works

The command

        $ WORKERS=n RAILS_ENV=production rake jobs:daemon:start

spawns a simple forking daemon, which spawns and restarts `n' instances of
Delayed::Worker. Worker processes are revived by the master process on receipt
of SIGCLD.

We can restart worker instances by sending SIGHUP to the master process or by
killing them directly. Sending SIGTERM, SIGINT, or SIGQUIT to the master
instructs it to kill its children and terminate.

Alternately, there are the tasks `jobs:daemon:restart' and `jobs:daemon:stop'

Two extra features:

* To avoid CPU thrashing, if a child worker dies 4 times in 60 seconds, a
  warning message is logged and the child sleeps for 300 seconds before
  booting up

* The master polls tmp/restart.txt and restarts children on timestamp update
031efe6
guns add the MAX_PRIORITY and MIN_PRIORITY envvars to worker initialization 8094bbf
Commits on Aug 21, 2010
@noriaki noriaki Fixed daemon_tasks load-path. 7a99461
guns Merge remote branch 'noriaki/delayed_job_daemon' into delayed_job_daemon acfb396
Commits on Aug 24, 2010
guns match Delayed::Worker timestamp style 7221810
Commits on Sep 05, 2010
guns Merge remote branch 'collectiveidea/master' into delayed_job_daemon
Conflicts:
	lib/delayed/tasks.rb
4c3e1c9
Commits on Sep 06, 2010
guns Merge remote branch 'collectiveidea/master' into delayed_job_daemon ec9423d
Commits on Sep 07, 2010
guns fix comment typo 65e58c5
guns Merge remote branch 'collectiveidea/master' into delayed_job_daemon 6f63660
guns temporary fix for http://github.com/collectiveidea/delayed_job/issues…
…/issue/113

rename PerformableMethod#method -> #delayed_method to avoid overriding
Object#method
ecfc1e4
Commits on Sep 09, 2010
guns Merge remote branch 'collectiveidea/master' into delayed_job_daemon 8bc1abd
guns add more comments for clarity
Also ensure that File.umask = 0022; forgot that parent shell could have
reset umask to something silly.
62272eb
guns move #kill_master out from outer scope and into an instance_eval e196028
guns Revert "temporary fix for http://github.com/collectiveidea/delayed_jo…
…b/issues/issue/113"

This reverts commit ecfc1e4.
76795ea
guns Merge branch 'delayed_job_daemon' into guns 1c73fd3
Commits on Sep 15, 2010
guns Merge remote branch 'collectiveidea/master' into delayed_job_daemon 4b52cbc
guns Merge branch 'delayed_job_daemon' into guns 706aa8b
Commits on Sep 17, 2010
guns KISS and check to see if the file exists before checking its mtime
Fixes bug where the master would constantly raise SIGHUP when
'restart.txt' didn't exist
9b8bf90
guns Merge branch 'delayed_job_daemon' into guns c7bc0e5
Commits on Sep 22, 2010
@giddie giddie Only remove the PID file when the master process is *actually* termin…
…ating.
ef64bbe
guns explicitly exit(0) on SIGTERM; keep it simple and trap less signals
Thanks to Brandon Keepers and Paul Gideon Dann for reporting that
`Process.kill :TERM, $$' does not work reliably.

For now, we will just exit(0) since that really won't do any harm.

Also, removed unnecessary traps on INT and QUIT.
b947840
guns rename rails_logger -> logger; more comments 980dacf
guns Merge branch 'delayed_job_daemon' into guns 3409b0d
Commits on Oct 04, 2010
guns Merge remote branch 'collectiveidea/master' into guns e046e91
guns reset :EXIT trap for children; dying children were incorrectly removi…
…ng master pid file
15678f4
guns Merge branch 'guns' into delayed_job_daemon 6b86241
guns reset child death log when user restarts daemon 6e63dc8
guns update comments to reflect change in signal handling 194291d
Commits on Nov 27, 2010
guns Merge remote branch 'collectiveidea/master' into delayed_job_daemon 324ce6e
Commits on Dec 27, 2011
@guns guns Patch DJ's monkey patch of YAML's monkey patch for Ruby 1.9.3 f8d3cf7
Commits on Feb 02, 2012
@pda pda Force YAML to use syck rather than psych. Eventually delayed_job shou…
…ld be made compatible with both.
4007069
@pda pda Guard against attempting YAML::ENGINE.yamler = "syck" in older rubies. 823fb2e
Commits on Feb 10, 2012
@guns guns Remove extant pid files with a warning.
Restarting workers on boot after a sudden shutdown was problematic.
55bed32
Something went wrong with that request. Please try again.