Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Tree: 1b3f5079b1
Fetching contributors…

Cannot retrieve contributors at this time

executable file 11 lines (10 sloc) 0.409 kB
#!/bin/bash
# kill all api workers (those that match the pattern but are not `cat pid`)
# the master should then take care of respawning workers
echo "slowly killing workers and allowing the master to respawn them"
for pid in `pgrep -f 'api-uwsgi' | grep -v \`cat pid\``; do
count=`pgrep -f 'api-uwsgi' | grep -v \`cat pid\` | wc -l`
echo "killing $pid - live workers: $count"
kill $pid
sleep 1
done
Jump to Line
Something went wrong with that request. Please try again.