-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathrun-test-queue.sh
executable file
·28 lines (22 loc) · 1.09 KB
/
run-test-queue.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/sh
RUNTIME=$(date "+%Y-%m-%d_%H-%M-%S")
SCRIPT=$(readlink -f "$0")
SCRIPT_PATH=$(dirname "$SCRIPT")
cd "${SCRIPT_PATH}"
while true
do
/usr/local/bin/docker-compose exec --user 33 -T php sh -c "cd web && drush php:script modules/custom/qa_shot/tools/RunRemoteQueues 2>&1 | tee /var/www/html/private_files/logs/remote/${RUNTIME}.txt"
/usr/local/bin/docker-compose exec --user 33 -T php sh -c "cd web && drush php:script modules/custom/qa_shot/tools/RunQAShotQueues 2>&1 | tee /var/www/html/private_files/logs/local/${RUNTIME}.txt"
sleep 1
done
##
# Global crontab, e.g /etc/cron.d
#
# # m h dom mon dow user command
#
## We want to restart on reboot.
#@reboot <user that's set up to use docker without sudo> /bin/sh -c "cd <path to qashot project root> && ./prod-startup.sh"
#
### Note: make sure /var/log/custom/qashot.cron.log is writable.
### Sleep for 20, so the drupal site can start.
# @reboot <user that's set up to use docker without sudo> sleep 20 && /bin/sh <path to qashot project root>/run-test-queue.sh 2>&1 | tee --append /var/log/custom/qashot.cron.log > /dev/null 2>&1 || true