From 304c5e34996fa20d2bc390d6b05b8ec92190e8a3 Mon Sep 17 00:00:00 2001 From: Alexandre Anriot Date: Tue, 9 Jun 2015 10:02:04 +0200 Subject: [PATCH 1/4] Add a mention about modoboa_amavis.settings --- doc/getting_started/install.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/doc/getting_started/install.rst b/doc/getting_started/install.rst index 3551fbeea..834ac1f09 100644 --- a/doc/getting_started/install.rst +++ b/doc/getting_started/install.rst @@ -103,6 +103,11 @@ Deployment If you want to use install all extensions, just use the ``all`` shortcut like this ``--extensions all``. + If you choose to install extensions one at a time, you will have to + add their names in settings.py to ``MODOBOA_APPS``. Also ensure that + you have the line ``from modoboa_amavis.settings import *`` at the + end of this file. + .. note:: You can specify more than one database connection using the From 7b9131d8664d2d3ceb507312541ce2b3fd0f7b3a Mon Sep 17 00:00:00 2001 From: Alexandre Anriot Date: Tue, 9 Jun 2015 10:02:25 +0200 Subject: [PATCH 2/4] Reflect the clearsessions change in Django --- doc/getting_started/configuration.rst | 2 +- doc/getting_started/upgrade.rst | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/doc/getting_started/configuration.rst b/doc/getting_started/configuration.rst index 940303e9a..a88a32131 100644 --- a/doc/getting_started/configuration.rst +++ b/doc/getting_started/configuration.rst @@ -343,7 +343,7 @@ whose ``expire_date`` is in the past. For example, you could setup a cron job to run this script every night:: - 0 0 * * * /manage.py cleanup + 0 0 * * * /manage.py clearsessions # # Or like this if you use a virtual environment: # 0 0 * * * /manage.py clearsessions diff --git a/doc/getting_started/upgrade.rst b/doc/getting_started/upgrade.rst index 59cd369bd..8466b4ea5 100644 --- a/doc/getting_started/upgrade.rst +++ b/doc/getting_started/upgrade.rst @@ -112,6 +112,11 @@ Here are the required steps: $ python manage.py load_initial_data $ python manage.py collectstatic +#. The cleanup job has been renamed in Django, so you have to modify your crontab entry:: + + - 0 0 * * * /manage.py cleanup + + 0 0 * * * /manage.py clearsessions + 1.2.0 ===== From 6faccba4dfc021579432a740c13c7c489b975155 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 10 Jun 2015 16:45:21 +0200 Subject: [PATCH 3/4] Fix #740 --- modoboa/core/commands/deploy.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modoboa/core/commands/deploy.py b/modoboa/core/commands/deploy.py index 8d965cba6..47d8e4934 100644 --- a/modoboa/core/commands/deploy.py +++ b/modoboa/core/commands/deploy.py @@ -31,6 +31,7 @@ DBCONN_TPL = """ 'PASSWORD': '{% if PASSWORD %}{{ PASSWORD }}{% endif %}', 'HOST': '{% if HOST %}{{ HOST }}{% endif %}', 'PORT': '{% if PORT %}{{ PORT }}{% endif %}', + 'ATOMIC_REQUESTS': True, {% if ENGINE == 'django.db.backends.mysql' %}'OPTIONS' : { "init_command" : 'SET foreign_key_checks = 0;', },{% endif %} From 2c9240ede0e13d1deaeeb66cbf677fd78dcb9493 Mon Sep 17 00:00:00 2001 From: Antoine Nguyen Date: Wed, 10 Jun 2015 16:51:37 +0200 Subject: [PATCH 4/4] Documentation update. --- doc/getting_started/upgrade.rst | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/doc/getting_started/upgrade.rst b/doc/getting_started/upgrade.rst index 8466b4ea5..443526745 100644 --- a/doc/getting_started/upgrade.rst +++ b/doc/getting_started/upgrade.rst @@ -49,6 +49,27 @@ you did choose. See :ref:`webservers` for more details. Specific upgrade instructions ***************************** +1.3.2 +===== + +Modoboa now uses the *atomic requests* mode to preserve database +consistency (`reference +`_). + +To enable it, update the ``DATABASES`` variable in ``settings.py`` as +follows:: + + DATABASES = { + "default": { + # stuff before... + "ATOMIC_REQUESTS": True + }, + "amavis": { + # stuff before... + "ATOMIC_REQUESTS": True + } + } + 1.3.0 =====