Created
November 2, 2015 21:09
-
-
Save rhyolight/a6aa626a9a17d77e5f44 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
pushd ~/nta/htmengine-traffic-tutorial/python-engine | |
export APPLICATION_CONFIG_PATH=`pwd`/conf | |
echo | |
echo "Stopping Supervisor services..." | |
supervisorctl stop all | |
echo | |
echo "Flushing RabbitMQ queues..." | |
rabbitmqctl stop_app | |
rabbitmqctl reset | |
rabbitmqctl start_app | |
echo | |
echo "Wiping MySQL database..." | |
mysql -u root --execute="DROP DATABASE traffic" | |
mysql -u root --execute="CREATE DATABASE traffic;" | |
echo | |
echo "Applying SQL migrations..." | |
python repository/migrate.py | |
echo | |
echo "Clearing out model checkpoints..." | |
rm -rf /Users/mtaylor/tmp/traffic-htmengine-app/model_checkpoints/* | |
echo | |
echo "Restarting Supervisor services..." | |
supervisorctl start all | |
popd | |
echo | |
echo "Complete." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment