11
script/dev_queue
Executable file
11
script/dev_queue
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
# script/dev_queue: Run the queue with entr if available
|
||||
|
||||
set -e
|
||||
|
||||
if [[ `command -v entr` ]]; then
|
||||
find atst | entr -r flask rq worker
|
||||
else
|
||||
flask rq worker
|
||||
fi
|
@@ -1,32 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
# script/dev_server: Launch a local dev version of the server in the background
|
||||
|
||||
#
|
||||
# WIP
|
||||
#
|
||||
|
||||
source "$(dirname "${0}")"/../script/include/global_header.inc.sh
|
||||
|
||||
# Create a function to run after a trap is triggered
|
||||
reap() {
|
||||
kill -s SIGTERM -- "-$$"
|
||||
sleep 0.1
|
||||
exit
|
||||
}
|
||||
|
||||
# Register trapping of SIGTERM and SIGINT
|
||||
trap reap SIGTERM SIGINT
|
||||
|
||||
# Display the script PID, which will also be the process group ID for all
|
||||
# child processes
|
||||
echo "Process Group: $$"
|
||||
|
||||
# Set server launch related environment variables
|
||||
DEBUG=1
|
||||
LAUNCH_ARGS="$*"
|
||||
|
||||
|
||||
# Launch the app
|
||||
source ./script/server &
|
||||
wait
|
@@ -4,8 +4,5 @@
|
||||
|
||||
source "$(dirname "${0}")"/../script/include/global_header.inc.sh
|
||||
|
||||
# Compile js/css assets
|
||||
yarn build
|
||||
|
||||
# Launch the app
|
||||
run_command "./app.py ${LAUNCH_ARGS}"
|
||||
run_command "honcho start"
|
||||
|
Reference in New Issue
Block a user