Skip to content

Commit

Permalink
[feature] Added default EMAIL_TIMEOUT #411
Browse files Browse the repository at this point in the history
Closes #411
  • Loading branch information
pandafy authored Dec 19, 2022
1 parent 4d3958f commit 256f5ab
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -835,6 +835,11 @@ Below are listed all the variables you can customize (you may also want to take
# uses "CeleryEmailBackend" from django-celery-email.
# (https://github.com/pmclanahan/django-celery-email)
openwisp2_email_backend: "djcelery_email.backends.CeleryEmailBackend"
# Email timeout in seconds used by Django for blocking operations
# like connection attempts. For more info read the Django documentation,
# https://docs.djangoproject.com/en/3.2/ref/settings/#email-timeout.
# Defaults to 10 seconds.
openwisp2_email_timeout: 5
# edit database settings only if you are not using sqlite
# eg, for deploying with PostgreSQL (recommended for production usage)
# you will need the PostGIS spatial extension, find more info at:
Expand Down
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ openwisp2_websocket_extra_routes: []
openwisp2_path: "/opt/openwisp2"
openwisp2_default_from_email: "openwisp2@{{ inventory_hostname }}"
openwisp2_email_backend: "djcelery_email.backends.CeleryEmailBackend"
openwisp2_email_timeout: 10
openwisp2_database:
engine: "django.contrib.gis.db.backends.spatialite"
name: "{{ openwisp2_path }}/db.sqlite3"
Expand Down
1 change: 1 addition & 0 deletions templates/openwisp2/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@
# Set default email
DEFAULT_FROM_EMAIL = '{{ openwisp2_default_from_email }}'
EMAIL_BACKEND = '{{ openwisp2_email_backend }}'
EMAIL_TIMEOUT = {{ openwisp2_email_timeout }}
# See http://docs.djangoproject.com/en/dev/topics/logging for
# more details on how to customize your logging configuration.
LOGGING = {
Expand Down

0 comments on commit 256f5ab

Please sign in to comment.