Migrating from 1.3.4 to 1.3.5¶
Warning
This guide has been updated because of issue 480. The only change is a fourth step under Update your settings to use django-celery-email.
If you have already completed the guide, but failed at the email settings step:
- Stop supervisord.
- Perform all changes in Update your settings to use django-celery-email.
- Start supervisord.
- Test that email is working as described in the last section of this guide.
Changes¶
Bugfixes:
- https://github.com/devilry/devilry-django/issues/477
- https://github.com/devilry/devilry-django/issues/478
The most significant change is django-celery-email as email backend.
django-celery-email sends all email into the Celery task queue, which then sends email in the background one at a time. This fixes scalibility problems when adding feedback in bulk. The issue that triggered this change was https://github.com/devilry/devilry-django/issues/477.
Backup database and files¶
BACKUP. YOUR. DATABASE. AND. FILES.
Update devilry¶
Move your logdir buildout config¶
Previous versions of devilry-deploy defined the logdir in the [supervisor]-section of buildout.cfg. This has been moved to [variables]. You should end up with something like this:
[variables]
logdir = /var/log/devilry
Update to v1.3.5 - but do not restart supervisord¶
Update REVISION to v1.3.5 using the instructions in the update guide, but stop after step 3.
Update your settings to use django-celery-email¶
Note
Settings are configured in devilry_prod_settings.py (see Build Devilry).
The default location is /etc/devilry, but it may have been placed in a custom location (also explained in Build Devilry).
To configure Devilry to use django-celery-email, do the following:
Make a backup of your current devilry_prod_settings.py, and put it somewhere safe in case the new email backend does not work correctly.
Replace the value of your EMAIL_BACKEND-setting with djcelery_email.backends.CeleryEmailBackend.
Prefix all other EMAIL_*-settings with CELERY_.
Add djcelery_email to the INSTALLED_APPS-setting:
INSTALLED_APPS += ['djcelery_email']
Make sure you use +=, NOT =.
You should end up with something like this:
EMAIL_BACKEND = 'djcelery_email.backends.CeleryEmailBackend'
CELERY_EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.example.com'
EMAIL_PORT = 25
INSTALLED_APPS += ['djcelery_email']
Warning
The fourth step in the list above was not included in the original release notes for 1.3.5. See https://github.com/devilry/devilry-django/issues/480.
Restart supervisord¶
Run the last step of the update guide.
Test that email sending is working¶
The that sending email works. You can do this as follows:
- Logging into the Devilry webUI.
- Select Superuser->Users.
- Click yourself (you can search).
- Click the Send a test email to <your username> button.
If you have the correct email address configured in Devilry, you should receive an email if sending is workin.
If it does not work, you should restore the old devilry_prod_settings.py and restart Devilry.