Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion bin/celery_flower.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,13 @@ set -e
# Set defaults for OTEL
export OTEL_SERVICE_NAME="${OTEL_SERVICE_NAME:-objects-flower}"

exec celery --app objects --workdir src flower
# 100x less than the defaults
export FLOWER_MAX_TASKS="${FLOWER_MAX_TASKS:-1000}"
export FLOWER_MAX_WORKERS="${FLOWER_MAX_WORKERS:-50}"

# TODO: rename CELERY_RESULT_BACKEND to CELERY_BROKER_URL
BROKER_URL="${CELERY_BROKER_URL:-${CELERY_RESULT_BACKEND:-redis://localhost:6379/0}}"

exec celery \
--broker "${BROKER_URL}" \
flower
3 changes: 3 additions & 0 deletions bin/docker_start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ if [ -n "${OBJECTS_SUPERUSER_USERNAME}" ]; then
unset OBJECTS_SUPERUSER_USERNAME OBJECTS_SUPERUSER_EMAIL OBJECTS_SUPERUSER_PASSWORD
fi

# Periodically recycle workers - recover memory in the event of memory leaks
export UWSGI_MAX_REQUESTS=${UWSGI_MAX_REQUESTS:-1000}

# Start server
>&2 echo "Starting server"
uwsgi \
Expand Down
Loading