Running long-lived processes in the background,

This commit is contained in:
Trent Bartlem 2014-11-04 13:50:38 +10:00
parent 1f317ae711
commit 8a022ae885
3 changed files with 10 additions and 4 deletions

View File

@ -29,7 +29,7 @@ sudo apt-get -y install rabbitmq-server
sudo pip install -r requirements.txt
chmod +x startup.sh
chmod +x *.sh
echo '--------'
echo 'This would be a good point to adjust mysql passwords, as well as all the stuff '

3
shutdown.sh Executable file
View File

@ -0,0 +1,3 @@
#!/usr/bin/env bash
ps ww | grep 'manage.py' | grep -v grep | awk '{print $1}' | xargs kill

View File

@ -1,8 +1,11 @@
#!/usr/bin/env bash
# TODO route log output to file.
python manage.py syncdb
python manage.py shell < run_alliance_corp_update.py
python manage.py celeryd --verbosity=2 --loglevel=DEBUG
python manage.py celerybeat --verbosity=2 --loglevel=DEBUG
python manage.py runserver
python manage.py celeryd --verbosity=2 --loglevel=DEBUG &
python manage.py celerybeat --verbosity=2 --loglevel=DEBUG &
python manage.py runserver &