0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-12-01 04:12:23 +01:00
posthog/bin/start-worker
Michael Matloka 9a389847c2
refactor(plugin-server): Remove --idle mode (#9798)
* refactor(plugin-server): Remove `--idle` mode

* Support `PLUGIN_SERVER_IDLE` in `bin/start-worker`

* Don't `export` needlessly in npm script
2022-05-16 16:22:49 +00:00

13 lines
421 B
Bash
Executable File

#!/bin/bash
set -e
# this kills all processes when the last one terminates
trap 'kill $(jobs -p)' EXIT
# start celery worker with heartbeat (-B)
SKIP_ASYNC_MIGRATIONS_SETUP=0 celery -A posthog worker -B --scheduler redbeat.RedBeatScheduler --without-heartbeat --without-gossip --without-mingle -Ofair -n node@%h &
if [[ "$PLUGIN_SERVER_IDLE" != "1" && "$PLUGIN_SERVER_IDLE" != "true" ]]; then
./bin/plugin-server
fi