seomoz / qless

Queue / Pipeline Management
MIT License
294 stars 76 forks source link

Gracefully handle SIGTERM in jruby. #153

Closed phs closed 7 years ago

phs commented 10 years ago
$ ruby --version
jruby 1.7.4 (1.9.3p392) 2013-05-16 2390d3b on Java HotSpot(TM) 64-Bit Server VM 1.7.0_12-ea-b08 +indy [darwin-x86_64]
$ bundle exec rake qless:work
The signal QUIT is in use by the JVM and will not work correctly on this platform

Turns out java doesn't let you handle SIGTERM because.. reasons? But one can still react by registering a shutdown hook.

If a shutdown hook is good enough, then qless might detect the jvm and react accordingly.