Fix uwsgi autoreload. (#11992)
* 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:
Родитель
355e25fd7d
Коммит
b34c8e3102
|
@ -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
|
||||
|
|
Загрузка…
Ссылка в новой задаче