Skip to content

Commit

Permalink
Total reload
Browse files Browse the repository at this point in the history
Now you can reload all the gunicorn processes by pressing "T". 
  • Loading branch information
martync committed Apr 8, 2013
1 parent 75779b3 commit 5587387
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion gunicorn_console.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ps_delay = 2 # Seconds between ps updates.
tick = -1 # Internal counter incremented in main event loop.
title = "(`\._./`\._.-> gunicorn-console <-._./`\._./`)"
instructions = """(r)eload master | (a)dd worker
instructions = """(r)eload master | (t)otal reload | (a)dd worker
kill (w)orker | kill (m)aster | (q)uit
up/down changes selection
"""
Expand Down Expand Up @@ -166,6 +166,12 @@ def handle_keypress(screen):
send_signal("HUP")
del gunicorns[selected_pid]
selected_pid = None
elif key in ("T",):
for pid in gunicorns.copy().iterkeys():
selected_pid = pid
send_signal("HUP")
del gunicorns[selected_pid]
selected_pid = None
elif key in ("M", "-"):
if selected_pid in gunicorns:
send_signal("QUIT")
Expand Down

0 comments on commit 5587387

Please sign in to comment.