我使用AWS弹性Beanstalk部署了一个Django应用程序。在
Django有时由两个不同的视图执行。 这些情况会导致问题:例如,在文件上载期间,同一个文件存储了两次。在
我认为这个问题是由于autoreload选项造成的。对吗? 我该怎么解决这个问题?在
更新: 以下是我的配置文件:
container_commands:
01_migrate:
command: "django-admin.py migrate"
leader_only: true
02_createsu:
command: "source /opt/python/run/venv/bin/activate && python manage.py createsu"
leader_only: true
03_update_permissions:
command: "source /opt/python/run/venv/bin/activate && python manage.py update_permissions"
leader_only: true
04_collectstatic:
command: "django-admin.py collectstatic --noinput"
option_settings:
aws:elasticbeanstalk:application:environment:
DJANGO_SETTINGS_MODULE: "olemshoe.settings_production"
aws:elasticbeanstalk:container:python:
WSGIPath: olemshoe/wsgi.py
NumProcesses: 3
NumThreads: 20
aws:elasticbeanstalk:container:python:staticfiles:
"/static/": "static/"
我应该将NumProcesses
设置为1吗?在
目前没有回答
相关问题 更多 >
编程相关推荐