Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

SIGTERM took too long to shutdown #133

Closed
wants to merge 2 commits into
from
Commits on Feb 4, 2012
  1. SIGTERM took too long to shutdown

    didip committed Feb 4, 2012
    If ran on slow machine (e.g. small VPS) and resque-scheduler is managed by daemon manager (e.g. Supervisord),
    
    during restart (e.g. /etc/init.d/supervisord restart),
    
    run() responded to SIGTERM but took too long to shutdown, resulting in multiple processes running.
    
    This commit will exit the loop immediately when @shutdown == true. I think it is safe to do it this way since all the scheduled jobs themselves are documented inside scheduled_jobs.yml.
    
    Sys-admins or deployers can simply make sure they don't deploy during the time described in scheduled_jobs.yml
    
    This behavior is similar to resque where it simply perform exit() and killed all children without mercy.