Skip to content

Commit

Permalink
Fix python path typo in the start dev server script (#253)
Browse files Browse the repository at this point in the history
* Fix python path typo in the start dev server script
Kill webpack in case of python error.

* Switch to use trap

* capture more signal.
  • Loading branch information
jetfuel authored Feb 5, 2018
1 parent 1ac2bf6 commit 13cc819
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/setup_dev_env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,4 @@ cd build
cmake ..
make -j $processors

export PYTHON_PATH=$PYTHON_PATH:"$SCRIPT_DIR/.."
export PYTHONPATH=$PYTHONPATH:"$SCRIPT_DIR/.."
12 changes: 11 additions & 1 deletion scripts/start_dev_server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,19 @@ CURRENT_DIR=`pwd`
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

cd $SCRIPT_DIR/../frontend
export PYTHONPATH=$PYTHONPATH:"$SCRIPT_DIR/.."

./node_modules/.bin/webpack --watch --config tool/webpack.dev.config.js --output-path=../visualdl/server/dist &
# Track webpack pid
WEBPACKPID=$!

function finish {
kill -9 $WEBPACKPID
}

export PYTHON_PATH=$PYTHON_PATH:"$SCRIPT_DIR/.."
trap finish EXIT HUP INT QUIT PIPE TERM

cd $CURRENT_DIR

#Run the visualDL with local PATH
python ${SCRIPT_DIR}/../visualdl/server/visualDL "$@"

0 comments on commit 13cc819

Please sign in to comment.