0👍
use uWSGI
pip install uwsgi
Create .ini for your project:
[uwsgi]
# set the http port
http = :8000
# change to django project directory
chdir = /var/www/myapp
# add /var/www to the pythonpath, in this way we can use the project.app format
pythonpath = /var/www
# set the project settings name
env = DJANGO_SETTINGS_MODULE=myapp.settings
# load django
module = django.core.handlers.wsgi:WSGIHandler()
Start it with built-in http server
uwsgi --ini django.ini --async 10
async — number of threads
-1👍
I’ve recently began delving into django-celery which is an asynchronous task queue for django. It allows you to queue up tasks to run asynchronously so that you don’t have to wait for responses. It’s simple to install and get started and it would allow your application to utilize asynchronous queueing instead of just your test suite.
http://django-celery.readthedocs.org/en/latest/getting-started/index.html
- [Django]-How can I use RESTful services with Django + Mongoengine?
- [Django]-Save user with generated password with Django
- [Django]-Server lagging – Django + mongodb + cronjob
Source:stackexchange.com