Update celery commands
This commit is contained in:
parent
9a5dea806f
commit
42fc5ebe3e
|
@ -114,7 +114,6 @@ matrix:
|
||||||
before_install:
|
before_install:
|
||||||
- mysql -e "CREATE DATABASE IF NOT EXISTS ${DB_NAME}"
|
- mysql -e "CREATE DATABASE IF NOT EXISTS ${DB_NAME}"
|
||||||
- sed -i '/psycopg2/d' $WEB/requirements.txt
|
- sed -i '/psycopg2/d' $WEB/requirements.txt
|
||||||
- sed -i 's/^RUN_EVERY =.*$/RUN_EVERY = 180/' $WEB/website/settings/constants.py
|
|
||||||
script:
|
script:
|
||||||
- cd $WEB && python manage.py runserver 0.0.0.0:8000 &
|
- cd $WEB && python manage.py runserver 0.0.0.0:8000 &
|
||||||
- sleep 10 && cd $DRIVER && fab integration_tests
|
- sleep 10 && cd $DRIVER && fab integration_tests
|
||||||
|
@ -132,7 +131,6 @@ matrix:
|
||||||
before_install:
|
before_install:
|
||||||
- psql -U postgres -c "CREATE DATABASE ${DB_NAME}"
|
- psql -U postgres -c "CREATE DATABASE ${DB_NAME}"
|
||||||
- sed -i '/mysqlclient/d' $WEB/requirements.txt
|
- sed -i '/mysqlclient/d' $WEB/requirements.txt
|
||||||
- sed -i 's/^RUN_EVERY =.*$/RUN_EVERY = 180/' $WEB/website/settings/constants.py
|
|
||||||
script:
|
script:
|
||||||
- cd $WEB && python manage.py runserver 0.0.0.0:8000 &
|
- cd $WEB && python manage.py runserver 0.0.0.0:8000 &
|
||||||
- sleep 10 && cd $DRIVER && fab integration_tests
|
- sleep 10 && cd $DRIVER && fab integration_tests
|
||||||
|
|
|
@ -7,6 +7,7 @@
|
||||||
python3 manage.py makemigrations website
|
python3 manage.py makemigrations website
|
||||||
python3 manage.py migrate
|
python3 manage.py migrate
|
||||||
|
|
||||||
|
python3 manage.py stopcelery
|
||||||
python3 manage.py startcelery
|
python3 manage.py startcelery
|
||||||
python3 manage.py runserver 0.0.0.0:8000 &
|
python3 manage.py runserver 0.0.0.0:8000 &
|
||||||
|
|
||||||
|
|
|
@ -5,14 +5,11 @@ addrport="0.0.0.0:8000"
|
||||||
# Wait for backend connection
|
# Wait for backend connection
|
||||||
/bin/bash wait-for-it.sh
|
/bin/bash wait-for-it.sh
|
||||||
|
|
||||||
# Kill any existing celery processes
|
|
||||||
pkill -9 -f celery
|
|
||||||
rm -f *.pid
|
|
||||||
|
|
||||||
## Needs a connection to a DB so migrations go here
|
## Needs a connection to a DB so migrations go here
|
||||||
python3 manage.py makemigrations website
|
python3 manage.py makemigrations website
|
||||||
python3 manage.py migrate
|
python3 manage.py migrate
|
||||||
python3 manage.py createuser admin $ADMIN_PASSWORD --superuser
|
python3 manage.py createuser admin $ADMIN_PASSWORD --superuser
|
||||||
|
python3 manage.py stopcelery
|
||||||
python3 manage.py startcelery
|
python3 manage.py startcelery
|
||||||
|
|
||||||
echo ""
|
echo ""
|
||||||
|
|
|
@ -13,7 +13,7 @@ profile=no
|
||||||
|
|
||||||
# Add files or directories to the blacklist. They should be base names, not
|
# Add files or directories to the blacklist. They should be base names, not
|
||||||
# paths.
|
# paths.
|
||||||
ignore=CVS,.git,manage.py,0001_initial.py,0002_enable_compression.py,0003_load_initial_data.py,0004_add_lhs.py,0005_add_workload_field.py,0006_session_hyperparameters.py,0007_executiontime.py,credentials.py,create_knob_settings.py
|
ignore=CVS,.git,manage.py,0001_initial.py,0002_enable_compression.py,0003_load_initial_data.py,0004_add_lhs.py,0005_add_workload_field.py,0006_session_hyperparameters.py,0007_executiontime.py,0008_change_result_taskids_field.py,credentials.py,create_knob_settings.py
|
||||||
|
|
||||||
# ignore-patterns=**/migrations/*.py
|
# ignore-patterns=**/migrations/*.py
|
||||||
|
|
||||||
|
|
|
@ -57,4 +57,6 @@ class Command(BaseCommand):
|
||||||
"Successfully stopped '{}'.".format(name)))
|
"Successfully stopped '{}'.".format(name)))
|
||||||
|
|
||||||
with quiet():
|
with quiet():
|
||||||
|
local("ps auxww | grep '[c]elery worker' | awk '{print $2}' | xargs kill -9")
|
||||||
|
local("ps auxww | grep '[c]elerybeat' | awk '{print $2}' | xargs kill -9")
|
||||||
local('rm -f {} {}'.format(options['celery_pidfile'], options['celerybeat_pidfile']))
|
local('rm -f {} {}'.format(options['celery_pidfile'], options['celerybeat_pidfile']))
|
||||||
|
|
Loading…
Reference in New Issue