diff --git a/HISTORY.rst b/HISTORY.rst index 1fd539552f..ae0d644339 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -1,4 +1,4 @@ -2.1 (2016-XX) +2.1 (2016-04) ============= - Upgrade to use Django 1.8.8. Issue #246. - Upgrade requirements. @@ -31,6 +31,7 @@ - Add support for signing documents. - Instead of multiple keyservers only one keyserver is now supported. - Replace document type selection widget with an opened selection list. +- Add simple server using tornado. 2.0.2 (2016-02-09) ================== diff --git a/docs/releases/2.1.rst b/docs/releases/2.1.rst index cbf2a47ec9..08be38e7e5 100644 --- a/docs/releases/2.1.rst +++ b/docs/releases/2.1.rst @@ -102,6 +102,15 @@ screen. These messages can have an activation and an experiation date and time. These messages are useful for display company access policies, maintenance announcement, etc. +New server app using tornado +---------------------------- +This release includes a simple app that can serve Mayan EDMS using the tornado +server. Using this app users can start using Mayan EDMS with minimal setup +(just install Redis). By default the server will run on port 52723, but users +can change the port with the --port option. For privileged port (ports +below 1024) the command must be run as superadmin. This is an experimental +feature, feedback and patches are appreciated. + Document signing ---------------- The biggest change for this release if the addition of document signing from diff --git a/mayan/apps/kaze/management/commands/serve.py b/mayan/apps/kaze/management/commands/serve.py index 5bb1344840..d68aa7489a 100755 --- a/mayan/apps/kaze/management/commands/serve.py +++ b/mayan/apps/kaze/management/commands/serve.py @@ -1,5 +1,7 @@ from __future__ import unicode_literals +import os + from django.core import management from django.core.wsgi import get_wsgi_application @@ -16,24 +18,23 @@ class Command(management.BaseCommand): help = 'Launches a local Tornado server.' def add_arguments(self, parser): - parser.add_argument( - '--single-process', - action='store_true', - dest='single-process', - default=False, - help='Forces only one server process.' - ) + parser.add_argument( + '--single-process', + action='store_true', + dest='single-process', + default=False, + help='Forces only one server process.' + ) - parser.add_argument( - '--port', - action='store', - dest='port', - default=DEFAULT_PORT, - help='Port on which to bind the server.' - ) + parser.add_argument( + '--port', + action='store', + dest='port', + default=DEFAULT_PORT, + help='Port on which to bind the server.' + ) def handle(self, *args, **options): - wsgi_application = get_wsgi_application() wsgi_container = tornado.wsgi.WSGIContainer(wsgi_application) @@ -56,13 +57,13 @@ class Command(management.BaseCommand): if options['single-process']: http_server.listen(options['port']) ioloop = tornado.ioloop.IOLoop.instance() - Subprocess(['./manage.py', 'celery', 'worker']) + Subprocess(['./manage.py', 'celery', 'worker', '-O', 'fair']) ioloop.start() else: http_server.bind(options['port']) http_server.start(0) # forks one process per cpu ioloop = tornado.ioloop.IOLoop.current() - Subprocess(['./manage.py', 'celery', 'worker']) + Subprocess(['./manage.py', 'celery', 'worker', '-O', 'fair']) ioloop.start() except KeyboardInterrupt: tornado.ioloop.IOLoop.instance().stop() diff --git a/mayan/settings/base.py b/mayan/settings/base.py index 6370ebba62..3ec5248527 100644 --- a/mayan/settings/base.py +++ b/mayan/settings/base.py @@ -57,6 +57,7 @@ INSTALLED_APPS = ( 'djcelery', 'filetransfers', 'formtools', + 'kombu.transport.django', 'mptt', 'pure_pagination', 'rest_framework', diff --git a/requirements/base.txt b/requirements/base.txt index 977f289885..2ace224e7c 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -34,5 +34,6 @@ python-gnupg==0.3.8 python-magic==0.4.10 pytz==2015.4 +redis==2.10.5 sh==1.11 tornado==4.3