I am developing the processing of bounce messages as my GSoC project.  
Currently the `Bounce Functions` are being developed in 
[this](https://gitlab.com/mailman/mailman/merge_requests/538) pr on GitLab.  
There is one `bool` attribute called 
`bounce_you_are_disabled_warnings_interval` in the `Mailing List` model.  
It means
>The number of days between each disabled notification.

Implementing this has a problem
- Say in the case of `process_bounces` function which processes the 
`BounceEvents` function it is easy it just takes one by one the events from the 
database and processes them.
- In the case of `Send_Warnings` function if the same approach was followed, 
meaning it would take one by one the `Address` instances, check tuples in the 
`bounce_info` attribute ( see the pr for this ) and see whether to send a 
warning mail or not to can be a slow method.
- Let's suppose the `Addresses` list is very long, then an `Address` instance 
in the very bottom of the list whose subscription has been disabled and some 
warning emails send, now waits to receive another mail as the interval is more 
than `bounce_you_are_disabled_warnings_interval`.
-  If the function is enumerating from the top then in order to take action 
first it has to reach this `Address` instance but the interval is already 
crossed. This can cause slow performance as the `warning mail` will be sent way 
late than it actually should have been sent.
- Also if I am implementing 2 functions `process_bounces` and `send_warnings` 
what if both of them attempted at the same `Address` instance?
- Basically `implementation on sending warning mails` and `implementation to 
increase bounce_score` are separate things and they can cause problems if they 
processed the same instance.


Pointers on above will be helpful.
Am I missing something above?
_______________________________________________
Mailman-Developers mailing list -- mailman-developers@python.org
To unsubscribe send an email to mailman-developers-le...@python.org
https://mail.python.org/mailman3/lists/mailman-developers.python.org/
Mailman FAQ: https://wiki.list.org/x/AgA3

Security Policy: https://wiki.list.org/x/QIA9

Reply via email to