* Fix uwsgi autoreload.

This will scan python modules for modifications every 3 seconds. It most
certainly will still be more efficient than Django's autoreload.

Fixes #11990

* re-add vaccum

* Use watchmedo to reload properly
This commit is contained in:
Christopher Grebs 2019-08-05 11:44:29 +02:00 коммит произвёл GitHub
Родитель 355e25fd7d
Коммит b34c8e3102
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
2 изменённых файлов: 11 добавлений и 6 удалений

Просмотреть файл

@ -76,6 +76,10 @@ djshell:
dbshell:
docker-compose exec web ./manage.py dbshell
.PHONY: reload-uwsgi
reload-uwsgi:
docker-compose exec web uwsgi --reload /code/docker/artifacts/addons-server-uwsgi-master.pid
# Run a make command in the container
.PHONY: make
make:

Просмотреть файл

@ -8,17 +8,18 @@ module = olympia.wsgi:application
master = true
# maximum number of worker processes
processes = 4
vaccum = true
socket = :8001
vacuum = true
uid = olympia
gid = olympia
memory-report = true
enable-threads = true
# This only points to the src/ directory which should cover
# 99% of autoreload scenarios. Coverting the whole %(base) will issue
# autoreloads on new uploads etc as they're in %(base)/storage/
fs-reload = %(base)/src/
# Run watchmedo (via watchdog) to implement unrestricted
# autoreload capability.
fs-reload = %(base)/docker/artifacts/
safe-pidfile = %(base)/docker/artifacts/addons-server-uwsgi-master.pid
attach-daemon = setsid watchmedo shell-command --patterns="*.py" --recursive --command='/usr/bin/touch %(safe-pidfile)' %(base)
max-requests = 5000
# Load apps in workers and not only in master