0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-21 13:39:22 +01:00

Add names to celery nodes (#7054 pt. 2) (#7433)

* add names to celery nodes

* use python instead

* hostname naming
This commit is contained in:
Yakko Majuri 2021-11-30 14:06:19 -03:00 committed by GitHub
parent 479807143b
commit 444568a06e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 2 deletions

View File

@ -1,5 +1,6 @@
#!/bin/bash
set -e
rm celerybeat.pid || echo "celerybeat.pid not found, proceeding"
celery -A posthog beat -S redbeat.RedBeatScheduler
celery -A posthog beat -S redbeat.RedBeatScheduler -n node@%%h

View File

@ -65,6 +65,7 @@ fi
FLAGS=()
FLAGS+=("-Ofair")
FLAGS+=("-n node@%%h")
[ "$with_gossip" == "false" ] && FLAGS+=("--without-gossip")
[ "$with_mingle" == "false" ] && FLAGS+=("--without-mingle")
[ "$with_heartbeat" == "false" ] && FLAGS+=("--without-heartbeat")

View File

@ -5,7 +5,7 @@ set -e
trap 'kill $(jobs -p)' EXIT
# start celery worker with heartbeat (-B)
celery -A posthog worker -B --scheduler redbeat.RedBeatScheduler --without-heartbeat --without-gossip --without-mingle -Ofair &
celery -A posthog worker -B --scheduler redbeat.RedBeatScheduler --without-heartbeat --without-gossip --without-mingle -Ofair -n node@%%h &
# start celery plugin worker
./bin/plugin-server