Skip to content

Commit

Permalink
fix: mprocs failing cause source: not found
Browse files Browse the repository at this point in the history
  • Loading branch information
orian committed Jan 3, 2025
1 parent 1b9aa47 commit c84b850
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bin/mprocs.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
procs:
celery-worker:
shell: 'bin/check_kafka_clickhouse_up && source ./bin/celery-queues.env && python manage.py run_autoreload_celery --type=worker'
shell: 'bin/check_kafka_clickhouse_up && ./bin/start-celery worker'

celery-beat:
shell: 'bin/check_kafka_clickhouse_up && source ./bin/celery-queues.env && python manage.py run_autoreload_celery --type=beat'
shell: 'bin/check_kafka_clickhouse_up && ./bin/start-celery beat'

plugin-server:
shell: 'bin/check_kafka_clickhouse_up && ./bin/plugin-server'
Expand Down
12 changes: 12 additions & 0 deletions bin/start-celery
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/bash
# Starts a celery worker / heartbeat job. Must be run with a type of process: worker | beat

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)
python manage.py run_autoreload_celery --type=$1

0 comments on commit c84b850

Please sign in to comment.