Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
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: iamnader/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 Oct 13, 2010
@edwinv edwinv Add delayed_job_args variable for Capistrano recipe to allow configur…
…ation of started workers (e.g. "-n 2 --max-priority 10")
08e498f
Commits on Oct 15, 2010
@jorgemanrubia jorgemanrubia Changed the way the error message is composed when a job fails. Whith…
… the previous implementation, if the raised error has a nil message, it will fail with a `<NoMethodError: undefined method '+' for nil:NilClass>`. Now it is using normal Ruby interpolation that will default to an empty String with nil messages.

Having an exception with a nil message is not a normal Ruby behaviour (Exceptions usually default to its class name when no message is provided), but it is possible. I am experiencing this problem because I am using the Ruby EDAM implementation of a commercial API, that doesn't set a message for its errors. The problem with delayed_job is quite serious, since it makes the jobs worker to crash completely (it kills the process).
2b23b80
Commits on Nov 07, 2010
@iamnader fixing documentation typo 2293667
Commits on Nov 12, 2010
@bkeepers bkeepers Merge branch 'master' of https://github.com/jorgemanrubia/delayed_job
* 'master' of https://github.com/jorgemanrubia/delayed_job:
  Changed the way the error message is composed when a job fails. Whith the previous implementation, if the raised error has a nil message, it will fail with a `<NoMethodError: undefined method '+' for nil:NilClass>`. Now it is using normal Ruby interpolation that will default to an empty String with nil messages.
6e8b218
@bkeepers bkeepers quiet down the specs 6d654ce
@bkeepers bkeepers Merge branch 'master' of https://github.com/bluetools/delayed_job
* 'master' of https://github.com/bluetools/delayed_job:
  Add delayed_job_args variable for Capistrano recipe to allow configuration of started workers (e.g. "-n 2 --max-priority 10")
d5beb84
@bkeepers bkeepers rescue argument error when deserializing job b64962d
@bkeepers bkeepers upgrade to rspec2 def384c
@bkeepers bkeepers Added Delayed::Job.reserve for a cleaner way to find and lock one ava…
…ilable job
1febad8
@bkeepers bkeepers fix deprecation warnings 488aaae
@bkeepers bkeepers Use new #reserve method in the worker 8e09ec0
@bkeepers bkeepers remove log_queries option. It will be replaced with better logger set…
…tings
626b5e2
@bkeepers bkeepers whitespace b0e1c7e
@bkeepers bkeepers move around serialization code 7b00063
@bkeepers bkeepers raise deserialization error when active record is not found 09bab8a
@bkeepers bkeepers rescue DeserializationError and mark job as failed
Closes #77
e090d3f
@bkeepers bkeepers Rework yaml serialization to make it less obtrusive cbde340
Commits on Nov 13, 2010
@bkeepers bkeepers Update README 3ff9711
@bkeepers bkeepers Added CHANGELOG e532041
@bkeepers bkeepers update README 3655aab
@bkeepers bkeepers update link to v2.0 branch in README 1a39108
@bkeepers bkeepers Fix issue where dirty tracking prevented job from being properly unlo…
…cked

Closes #63
e03a584
Commits on Nov 15, 2010
@bkeepers bkeepers Prepare for 2.1.0 release 5cbc4b3
@bkeepers bkeepers Fix #reserve method to call Worker#name c03b065
@bkeepers bkeepers failing spec for serialization issue f99439a
@bkeepers bkeepers Revert serialization refactoring that had some major issues
This reverts commit cbde340.
ffd1173
@bkeepers bkeepers Prepare for 2.1.1 release fcca64c
Commits on Nov 24, 2010
@bkeepers bkeepers bundle update 8787a11
@bkeepers bkeepers Update shared spec to only call #reserve method on job
#reserve will become part of the public backend API. Other backends can still implement #find_available and #lock_exclusively and call them, but they must implement #reserve.
f4fc9a2
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.