This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script gracefully stops resque workers by issuing the USR2 | |
# signal to the resque-pool manager and then waits for the workers | |
# to be paused before exiting. Resque-pool master process relays | |
# the USR2 signal to the children. | |
# | |
# For reference: | |
# (1) https://github.com/nevans/resque-pool#signals | |
# (2) https://github.com/resque/resque/blob/master/lib/resque/worker.rb#L376-L378 |