We don't need this in a Python 3-only world.
Remove six in follows:
1. zaqar/common/transport/wsgi/helpers.py
2. zaqar/common/urls.py
3. zaqar/common/utils.py
4. zaqar/notification/notifier.py
5. zaqar/notification/tasks/mailto.py
Change-Id: Iae6d4f415b215b9fdf675a0fcf00282fc98d58b7
This patch introduces the delivery retry policy into Zaqar.
It will work when the notification sent from Zaqar to the
subscriber failed.
User can define the retry policy in the options of subscription or
metadata of queue.
Change-Id: I1a74c2d5b69fb82826c303468099db34b3e41b5b
Implements: bp notification-delivery-policy
Since the default value is None when can't get a key from a dict,
So there is no need to use dict.get('key', None).
Clear them from Zaqar code tree.
Change-Id: I96d3438e13893bbe994f2f93cb8945a04e4d3ff9
This patch is the third part of subscription confirmation feature.
Support to send email to subscriber if confirmation is needed.
Change-Id: I230f5c7fbc9d19554bbcf34ce9b2f3b14230321b
Implements: blueprint subscription-confirmation-support
Currently, Zaqar's notifier driver will be initialized without
any parameter when creating the subscription controller. As a
result, default value 'False' will be used instead of getting
the correct value from conf. This patch will fix this by getting
the option from conf.
Closes-Bug: #1655812
Change-Id: I31ac8c3d374b3ea38d035f1012571e6c49a18b87
Currently even though the 'require_confirmation' option is False,
Zaqar will send the confirmation notification anyway, which is
breaking the backward compatibility. This patch will fix it and
add a test for that.
Closes-Bug: #1633222
Change-Id: I2d6363feab90ff737684d5c1d903c2c2d7abe106
The subscription confirmation feature will contain four patches:
1. webhook with mongoDB
2. email with mongoDB
3. webhook with redis
4. email with redis
This patch is the first part of subscription confirmation feature for
webhook with MongoDB. Others will be achieved in follow patches.
This patch did:
1. Add v2/queue/<queue_name>/subscription/<subscription_id>/confirm
endpoint.
2. Add a new config option: "require_confirmation".
3. Add a new property "confirmed" to subscription resource for
MongoDB driver.
4. Add a new policy "subscription: confirm".
5. Add a new property "message type" for notification.
6. Use the pre-signed url in confirm request.
8. Re-use POST subscription to allow re-confirm.
9. Update notification for webhook subscription with mongoDB.
10. Support unsubscrib the subscription
11. Add tests for the feature.
12. Add doc and sample.
Docimpact
APIimpact
Change-Id: Id38d4a5b4f9303b12e22e2b5c248facda4c00143
Implements: blueprint subscription-confirmation-support
Query for all subscriptions on a given queue by taking into account the
returned marker, if any.
Change-Id: I6b03dd93cabc76d1c91041a896fbb30ac08032f1
Closes-Bug: #1590173
Make the max_workers attribute of NotifierDriver configurable.
Now it can be configured using 'max_workers' parameter. Default
value of max_workers is 10.
Co-Authored-By: wangxiyuan<wangxiyuan@huawei.com>
Change-Id: Ice7d12199f8463793951932b48408e7df81440f2
When notification pipeline and pooling are both enabled, the method
'post' of NotifierDriver will be called two times. One for normal
SubscriptionController and one for pooling.SubscriptionController.
So a check was added to avoid the notifition is sent two times, but
unfortunately an unintentional error was introduced. This patch fixes
it by refactoring the condition checking.
Change-Id: Ie22748e86a50b7d91f24707b0c5a3ab718f005a2
In zaqar, there are some improperly log using in code tree. Like in some
place, should use LOG.exception not LOG.error, repeat log calling, etc.
Those could be optimized for better code.
Change-Id: I99b830c4db4f2b9449cad713f37474f5ecbce05e
Closes-Bug: #1543563
Now when the pooling is enabled, notification will be triggered two
times because the subscription controller of pooling is also in the
pipeline. This patch fixes it by checking the subscription controller
type.
Closes-Bug: #1489686
Change-Id: I55c72e3869e9b0490bcab3bcae571946bda65aa5
Trying to use the greenlet executor doesn't work when we don't use
taskflow, as nothing is doing the monkeypatching. Let's use threads for
now.
Closes-Bug: #1491326
Change-Id: Ic59f75a883eff1d4f0e4683f9d8ea4d943ad7aac
Instead of going through taskflow, use the executor directly in the
notifier, so that task execution doesn't block the pipeline and the main
loop when running.
Change-Id: I8cc555494d1d40ec7521046ce1b4a28b9b85e0ba
1. Using stevedore to load the task instance
2. Pass in messages list to task instead of single message
Change-Id: Ie8a475b8c2530bfd0fb2d39929c1611288c601fe
This library replaces the taskflow library for this functionality
so it should be moved to instead of using the built-in taskflow
types (and utils).
Change-Id: I8b4099209246a2b79f404271f31ab1303211358c
This skips taskflow launch when the notifier is called for a queue
without subscriber, preventing a traceback.
Change-Id: I63571a163efae523e52798fe4039f48859fa1fee
Closes-Bug: #1478841
This patch adds a notifier driver for webhook and the basic
task management code with taskflow.
DocImpact
Partially-Implements blueprint: notifications
Change-Id: I2727726cc57f03fb94184653452223f00fcf3d0c