edx-ace 1.8.0__tar.gz → 1.9.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {edx-ace-1.8.0/edx_ace.egg-info → edx-ace-1.9.1}/PKG-INFO +1 -1
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/__init__.py +1 -1
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/channel/django_email.py +1 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/message.py +7 -0
- edx-ace-1.9.1/edx_ace/monitoring.py +9 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1/edx_ace.egg-info}/PKG-INFO +1 -1
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace.egg-info/requires.txt +1 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/requirements/base.in +1 -0
- edx-ace-1.8.0/edx_ace/monitoring.py +0 -17
- {edx-ace-1.8.0 → edx-ace-1.9.1}/CHANGELOG.rst +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/LICENSE.txt +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/MANIFEST.in +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/README.rst +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/ace.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/apps.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/channel/__init__.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/channel/braze.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/channel/file.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/channel/mixins.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/channel/sailthru.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/delivery.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/errors.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/policy.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/presentation.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/recipient.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/recipient_resolver.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/renderers.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/serialization.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/templatetags/acetags.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/test_utils/__init__.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/channel/test_braze.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/channel/test_channel_helpers.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/channel/test_django_email.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/channel/test_file_email.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/channel/test_sailthru.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_ace.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_date.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_delivery.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_message.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_policy.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_presentation.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_templates/testapp/edx_ace/testmessage/email/body.html +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/tests/test_templates/testapp/edx_ace/testmessage/email/head.html +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/utils/__init__.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/utils/date.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/utils/once.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace/utils/plugins.py +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace.egg-info/SOURCES.txt +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace.egg-info/dependency_links.txt +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace.egg-info/entry_points.txt +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace.egg-info/not-zip-safe +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/edx_ace.egg-info/top_level.txt +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/requirements/constraints.txt +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/setup.cfg +0 -0
- {edx-ace-1.8.0 → edx-ace-1.9.1}/setup.py +0 -0
@@ -73,6 +73,9 @@ class Message(MessageAttributeSerializationMixin, metaclass=ABCMeta):
|
|
73
73
|
default=None
|
74
74
|
)
|
75
75
|
options = attr.ib()
|
76
|
+
|
77
|
+
# headers are only supported for DjangoEmailChannel
|
78
|
+
headers = attr.ib()
|
76
79
|
language = attr.ib(default=None)
|
77
80
|
log_level = attr.ib(default=None)
|
78
81
|
|
@@ -84,6 +87,10 @@ class Message(MessageAttributeSerializationMixin, metaclass=ABCMeta):
|
|
84
87
|
def default_options_value(self):
|
85
88
|
return {}
|
86
89
|
|
90
|
+
@headers.default
|
91
|
+
def default_headers_value(self):
|
92
|
+
return {}
|
93
|
+
|
87
94
|
@uuid.default
|
88
95
|
def generate_uuid(self):
|
89
96
|
return uuid4()
|
@@ -0,0 +1,9 @@
|
|
1
|
+
"""
|
2
|
+
:mod:`edx_ace.monitoring` exposes functions that are useful for reporting ACE
|
3
|
+
message delivery stats to monitoring services.
|
4
|
+
"""
|
5
|
+
from edx_django_utils.monitoring import set_custom_attribute
|
6
|
+
|
7
|
+
|
8
|
+
def report(key, value):
|
9
|
+
set_custom_attribute(key, value)
|
@@ -1,17 +0,0 @@
|
|
1
|
-
"""
|
2
|
-
:mod:`edx_ace.monitoring` exposes functions that are useful for reporting ACE
|
3
|
-
message delivery stats to monitoring services.
|
4
|
-
"""
|
5
|
-
try:
|
6
|
-
import newrelic.agent
|
7
|
-
except ImportError:
|
8
|
-
newrelic = None # pylint: disable=invalid-name
|
9
|
-
|
10
|
-
|
11
|
-
def report(key, value):
|
12
|
-
report_to_newrelic(key, value)
|
13
|
-
|
14
|
-
|
15
|
-
def report_to_newrelic(key, value):
|
16
|
-
if newrelic:
|
17
|
-
newrelic.agent.add_custom_parameter(key, value)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|