mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-30 19:41:46 +01:00
23 lines
329 B
Bash
Executable File
23 lines
329 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -e
|
|
|
|
cleanup() {
|
|
echo "Stopping worker..."
|
|
if kill -0 "$worker_pid" >/dev/null 2>&1; then
|
|
kill "$worker_pid"
|
|
else
|
|
echo "Worker process is not running."
|
|
fi
|
|
}
|
|
|
|
trap cleanup SIGINT SIGTERM EXIT
|
|
|
|
python3 manage.py start_temporal_worker "$@" &
|
|
|
|
worker_pid=$!
|
|
|
|
wait $worker_pid
|
|
|
|
cleanup
|