edx-ace 1.10.0__py2.py3-none-any.whl → 1.11.0__py2.py3-none-any.whl
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/__init__.py +1 -1
- edx_ace/channel/__init__.py +4 -2
- edx_ace/delivery.py +3 -0
- edx_ace/signals.py +7 -0
- {edx_ace-1.10.0.dist-info → edx_ace-1.11.0.dist-info}/METADATA +8 -8
- {edx_ace-1.10.0.dist-info → edx_ace-1.11.0.dist-info}/RECORD +10 -9
- {edx_ace-1.10.0.dist-info → edx_ace-1.11.0.dist-info}/WHEEL +1 -1
- {edx_ace-1.10.0.dist-info → edx_ace-1.11.0.dist-info}/LICENSE.txt +0 -0
- {edx_ace-1.10.0.dist-info → edx_ace-1.11.0.dist-info}/entry_points.txt +0 -0
- {edx_ace-1.10.0.dist-info → edx_ace-1.11.0.dist-info}/top_level.txt +0 -0
edx_ace/__init__.py
CHANGED
edx_ace/channel/__init__.py
CHANGED
@@ -5,6 +5,7 @@ to add new delivery :class:`Channel` instances to an ACE application.
|
|
5
5
|
Developers wanting to add a new deliver channel should subclass :class:`Channel`,
|
6
6
|
and then add an entry to the ``openedx.ace.channel`` entrypoint in their ``setup.py``.
|
7
7
|
"""
|
8
|
+
|
8
9
|
import abc
|
9
10
|
import itertools
|
10
11
|
from collections import OrderedDict, defaultdict
|
@@ -24,6 +25,7 @@ class ChannelType(Enum):
|
|
24
25
|
"""
|
25
26
|
All supported communication channels.
|
26
27
|
"""
|
28
|
+
|
27
29
|
EMAIL = 'email'
|
28
30
|
PUSH = 'push'
|
29
31
|
|
@@ -127,7 +129,7 @@ class ChannelMap:
|
|
127
129
|
except (StopIteration, KeyError) as error:
|
128
130
|
raise UnsupportedChannelError(
|
129
131
|
f'No implementation for channel {channel_type} is registered. '
|
130
|
-
f'Available channels are: {channels()}'
|
132
|
+
f'Available channels are: {channels()}',
|
131
133
|
) from error
|
132
134
|
|
133
135
|
def __str__(self):
|
@@ -178,7 +180,7 @@ def get_channel_for_message(channel_type, message):
|
|
178
180
|
channel_names = [settings.ACE_CHANNEL_TRANSACTIONAL_EMAIL, settings.ACE_CHANNEL_DEFAULT_EMAIL]
|
179
181
|
else:
|
180
182
|
channel_names = [settings.ACE_CHANNEL_DEFAULT_EMAIL]
|
181
|
-
elif channel_type == ChannelType.PUSH:
|
183
|
+
elif channel_type == ChannelType.PUSH and getattr(settings, "ACE_CHANNEL_DEFAULT_PUSH", None):
|
182
184
|
channel_names = [settings.ACE_CHANNEL_DEFAULT_PUSH]
|
183
185
|
|
184
186
|
try:
|
edx_ace/delivery.py
CHANGED
@@ -10,6 +10,7 @@ import time
|
|
10
10
|
from django.conf import settings
|
11
11
|
|
12
12
|
from edx_ace.errors import RecoverableChannelDeliveryError
|
13
|
+
from edx_ace.signals import ACE_MESSAGE_SENT
|
13
14
|
from edx_ace.utils.date import get_current_time
|
14
15
|
|
15
16
|
LOG = logging.getLogger(__name__)
|
@@ -60,8 +61,10 @@ def deliver(channel, rendered_message, message):
|
|
60
61
|
message.report(f'{channel_type}_delivery_retried', num_seconds)
|
61
62
|
else:
|
62
63
|
message.report(f'{channel_type}_delivery_succeeded', True)
|
64
|
+
ACE_MESSAGE_SENT.send(sender=channel, message=message)
|
63
65
|
return
|
64
66
|
|
65
67
|
delivery_expired_report = f'{channel_type}_delivery_expired'
|
66
68
|
logger.debug(delivery_expired_report)
|
67
69
|
message.report(delivery_expired_report, get_current_time() - start_time)
|
70
|
+
ACE_MESSAGE_SENT.send(sender=channel, message=message)
|
edx_ace/signals.py
ADDED
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: edx-ace
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.11.0
|
4
4
|
Summary: Framework for Messaging
|
5
5
|
Home-page: https://github.com/openedx/edx-ace
|
6
6
|
Author: edX
|
@@ -18,19 +18,19 @@ Classifier: Programming Language :: Python :: 3
|
|
18
18
|
Classifier: Programming Language :: Python :: 3.8
|
19
19
|
Classifier: Programming Language :: Python :: 3.12
|
20
20
|
Description-Content-Type: text/x-rst
|
21
|
-
Requires-Dist: Django
|
22
|
-
Requires-Dist: attrs
|
21
|
+
Requires-Dist: Django>=2.2
|
22
|
+
Requires-Dist: attrs>=17.2.0
|
23
23
|
Requires-Dist: django-push-notifications
|
24
|
-
Requires-Dist: edx-django-utils
|
24
|
+
Requires-Dist: edx-django-utils>=5.14.2
|
25
25
|
Requires-Dist: firebase-admin
|
26
26
|
Requires-Dist: python-dateutil
|
27
|
-
Requires-Dist: sailthru-client
|
27
|
+
Requires-Dist: sailthru-client==2.2.3
|
28
28
|
Requires-Dist: six
|
29
|
-
Requires-Dist: stevedore
|
29
|
+
Requires-Dist: stevedore>=1.10.0
|
30
30
|
Provides-Extra: push_notifications
|
31
|
-
Requires-Dist: django-push-notifications[fcm]
|
31
|
+
Requires-Dist: django-push-notifications[fcm]; extra == "push-notifications"
|
32
32
|
Provides-Extra: sailthru
|
33
|
-
Requires-Dist: sailthru-client
|
33
|
+
Requires-Dist: sailthru-client<2.3,>2.2; extra == "sailthru"
|
34
34
|
|
35
35
|
edX Automated Communication Engine (A.C.E.)
|
36
36
|
###########################################
|
@@ -1,7 +1,7 @@
|
|
1
|
-
edx_ace/__init__.py,sha256=
|
1
|
+
edx_ace/__init__.py,sha256=Xv6M4HdHQpNgFx-erx42PwA3ufTaopGDNBZTYIBLZJ0,636
|
2
2
|
edx_ace/ace.py,sha256=0nP8zvIWiME4qmpMT1PaV4nRDG6YR9Dxm7A6FGoBa8I,2501
|
3
3
|
edx_ace/apps.py,sha256=xNedkdW6TNpm-W1uxnj3Vre2R1akkh2n_7DkSfKXmAk,216
|
4
|
-
edx_ace/delivery.py,sha256=
|
4
|
+
edx_ace/delivery.py,sha256=8pL-sibMIMUSZZv1SlxX2JnJ6lKc0u-oZwx9FXQ2Nyc,2861
|
5
5
|
edx_ace/errors.py,sha256=y0MqT55qXLkpn_r5LVhHcYuU2-zHs56CQTAbNCqb72k,1065
|
6
6
|
edx_ace/message.py,sha256=lhmPor9vnaLvC4NPyRgB-obpGjGv9Lni0obcOUTgyCg,8340
|
7
7
|
edx_ace/monitoring.py,sha256=6nEcAJMCr9keCTJw9JjGecTg_J1ubcGJfuGiFq2B8G4,257
|
@@ -11,7 +11,8 @@ edx_ace/recipient.py,sha256=ogZjjKorAc6yiqvcnXcAMsHz2uAfhYU5qLPUoifofXQ,576
|
|
11
11
|
edx_ace/recipient_resolver.py,sha256=ChY0cgLSt_HioKSHyuCh7iHSJOsBWuivsOvAc6QyedE,959
|
12
12
|
edx_ace/renderers.py,sha256=eJcTWyRhny-3PLHDV4Rozk1TJ0fjsqgOcFOWO_TTngk,3143
|
13
13
|
edx_ace/serialization.py,sha256=EptnQqbI9j5kVqdUDAlm2pcm3dUsFwsP9tAji3y5uqc,3775
|
14
|
-
edx_ace/
|
14
|
+
edx_ace/signals.py,sha256=7kwpw7SgpPP6TRTtTQeGEOZ2cD_AcD4sSrpVxd_a19w,160
|
15
|
+
edx_ace/channel/__init__.py,sha256=l2qZdiQb2HFsMixWjqf50-si7aGr06M2MvEYc7XayjU,6890
|
15
16
|
edx_ace/channel/braze.py,sha256=k-R9jZpiBQTV0FQ3Z2gOipVgxNpBMPSLBL71muh9go4,10240
|
16
17
|
edx_ace/channel/django_email.py,sha256=9TNdiFJ2U3QjKEriUl3_9twAFkH-E2EmrWujStUOWN0,2174
|
17
18
|
edx_ace/channel/file.py,sha256=_Jx8o5Cw8IpEdaF7g-ljF7CEqswBHmuwyupm_tkI2wk,3028
|
@@ -39,9 +40,9 @@ edx_ace/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
39
40
|
edx_ace/utils/date.py,sha256=Rmz3RAUCdd30hu1qcKH7FmAypaw1aSoZg-yfZig1c8A,1483
|
40
41
|
edx_ace/utils/once.py,sha256=sY3szBh3gvvAjrKbKq4S2mCejompjh5YcYD7XOhzjGU,2024
|
41
42
|
edx_ace/utils/plugins.py,sha256=U-l-eU2uWUiiwYV-H-2DfmwjoksqskAsYwS7QnThy2Q,2090
|
42
|
-
edx_ace-1.
|
43
|
-
edx_ace-1.
|
44
|
-
edx_ace-1.
|
45
|
-
edx_ace-1.
|
46
|
-
edx_ace-1.
|
47
|
-
edx_ace-1.
|
43
|
+
edx_ace-1.11.0.dist-info/LICENSE.txt,sha256=VrSJ4gO4NCpskzfNHbaTB4VcN9Q213YdcHbpOZSwcOA,35138
|
44
|
+
edx_ace-1.11.0.dist-info/METADATA,sha256=eBw0pn7XPxj37ipJV3WDqZcUsYKQQr-6YSETs4C82WU,10106
|
45
|
+
edx_ace-1.11.0.dist-info/WHEEL,sha256=fS9sRbCBHs7VFcwJLnLXN1MZRR0_TVTxvXKzOnaSFs8,110
|
46
|
+
edx_ace-1.11.0.dist-info/entry_points.txt,sha256=fiR8u0PqGyp2qIiJxcSrYhIZ3gEwl0vIMnTPWegXwRI,332
|
47
|
+
edx_ace-1.11.0.dist-info/top_level.txt,sha256=5eg_80KI88VkeiCVqZUqcYcc_PfPOg8o1GA4HxsiRU8,8
|
48
|
+
edx_ace-1.11.0.dist-info/RECORD,,
|
File without changes
|
File without changes
|
File without changes
|