entrypoint_celery.sh 447 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/bin/bash

set -e

# Wait for Redis server to start
sleep 10

# Could do the following if redis-tools installed:
# X="`redis-cli -h \"$CELERY_BROKER_HOST\" ping`"
# echo ${X}
#
# while  [ "${X}" != "PONG" ]; do
#     >&2 echo "Redis is unavailable: Sleeping"
#     echo "${X}"
#     sleep 5
# done
# >&2 echo "Redis is up"

cd /usr/src/app/website/
>&2 echo "Starting celery worker"
Joren Vrancken's avatar
Joren Vrancken committed
21
22
celery worker --app thaliawebsite --statedb /celery/state.db