mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-22 08:40:03 +01:00
18 lines
513 B
Bash
Executable File
18 lines
513 B
Bash
Executable File
#!/bin/bash
|
|
set -e
|
|
|
|
# this kills all processes when the last one terminates
|
|
trap 'kill $(jobs -p)' EXIT
|
|
|
|
source ./bin/celery-queues.env
|
|
|
|
# start celery worker with heartbeat (-B)
|
|
SKIP_ASYNC_MIGRATIONS_SETUP=0 CELERY_WORKER_QUEUES=$CELERY_WORKER_QUEUES celery -A posthog worker --without-heartbeat --without-mingle --pool=threads -Ofair -n node@%h &
|
|
celery -A posthog beat -S redbeat.RedBeatScheduler &
|
|
|
|
if [[ "$PLUGIN_SERVER_IDLE" != "1" && "$PLUGIN_SERVER_IDLE" != "true" ]]; then
|
|
./bin/plugin-server
|
|
fi
|
|
|
|
wait
|