new: [doc] Added worker script

pull/150/head
Steve Clement 2018-11-28 16:39:31 +09:00
parent b20f8d4a34
commit cdcc5b650e
1 changed files with 18 additions and 0 deletions

18
automation/start_workers.sh Executable file
View File

@ -0,0 +1,18 @@
#!/usr/bin/env bash
# Check if run as root
if [ "$EUID" -eq 0 ]; then
echo "Please DO NOT run the worker script as root"
exit 1
fi
# Extract base directory where this script is and cd into it
cd "${0%/*}"
../cake CakeResque.CakeResque stop --all
../cake CakeResque.CakeResque start --interval 5 --queue default
../cake CakeResque.CakeResque start --interval 5 --queue prio
../cake CakeResque.CakeResque start --interval 5 --queue cache
../cake CakeResque.CakeResque start --interval 5 --queue email
../cake CakeResque.CakeResque startscheduler --interval 5
exit 0