mirror of
https://github.com/nikdoof/test-auth.git
synced 2025-12-14 23:02:19 +00:00
Added better options to manage celeryd
This commit is contained in:
10
fabfile.py
vendored
10
fabfile.py
vendored
@@ -153,12 +153,20 @@ def stop_celeryd():
|
||||
|
||||
with cd('%(path)s/dreddit-auth/' % env):
|
||||
if exists('logs/celeryd.pid'):
|
||||
run('kill `cat logs/celeryd.pid`')
|
||||
run('kill -15 `cat logs/celeryd.pid`')
|
||||
time.sleep(2)
|
||||
run('rm -f logs/celeryd.pid')
|
||||
else:
|
||||
warn('celeryd isn\'t running')
|
||||
|
||||
def kill_celeryd():
|
||||
"""
|
||||
Kills all Celeryd instances
|
||||
"""
|
||||
with cd('%(path)s/dreddit-auth/' % env):
|
||||
run("ps auxww | grep celeryd | awk '{print $2}' | xargs kill -9")
|
||||
|
||||
|
||||
def restart_celeryd():
|
||||
"""
|
||||
Restart the celery daemon
|
||||
|
||||
Reference in New Issue
Block a user