Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove I18N binary file django.mo and compile the file before starting processes #1505

Merged
merged 5 commits into from
Jul 31, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Binary file removed apiserver/paasng/locale/en/LC_MESSAGES/django.mo
Binary file not shown.
2 changes: 2 additions & 0 deletions apiserver/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ GUNICORN_MAX_REQUESTS=${GUNICORN_MAX_REQUESTS:-2048}
## 初始化静态资源.
mkdir -p ../public/assets
python manage.py collectstatic
# I18N: compile .po file to .mo files
python manage.py compilemessages
piglei marked this conversation as resolved.
Show resolved Hide resolved

command="gunicorn paasng.wsgi -w ${GUNICORN_CONCURRENCY} --timeout ${GUNICORN_TIMEOUT} -b [::]:8000 -k gevent --max-requests ${GUNICORN_MAX_REQUESTS} --access-logfile '-' --access-logformat '%(h)s %(l)s %(u)s %(t)s \"%(r)s\" %(s)s %(b)s \"%(f)s\" \"%(a)s\" in %(L)s seconds' --log-level ${GUNICORN_LOG_LEVEL} --log-file=-"

Expand Down
2 changes: 2 additions & 0 deletions apiserver/start_admin42.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ python manage.py migrate

mkdir -p ../public/assets
python manage.py collectstatic --noinput
# I18N: compile .po file to .mo files
python manage.py compilemessages

## Run!
command="python manage.py runserver 0.0.0.0:"$PORT
Expand Down
3 changes: 3 additions & 0 deletions apiserver/start_celery.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@ CELERY_CONCURRENCY=${CELERY_CONCURRENCY:-6}
CELERY_LOG_LEVEL=${CELERY_LOG_LEVEL:-info}
CELERY_TASK_DEFAULT_QUEUE=${CELERY_TASK_DEFAULT_QUEUE:-}

# I18N: compile .po file to .mo files
python manage.py compilemessages

if [ "${CELERY_TASK_DEFAULT_QUEUE}" = '' ]; then
command="celery -A paasng worker -l ${CELERY_LOG_LEVEL} --concurrency ${CELERY_CONCURRENCY}"
else
Expand Down