genkgo / mail

Library to send e-mails over different transports and protocols (like SMTP and IMAP) using immutable messages and streams. Also includes SMTP server.
https://mail.readthedocs.io/
Other
402 stars 21 forks source link

Enhance queue functionality #41

Closed GwendolenLynch closed 6 years ago

GwendolenLynch commented 6 years ago

Use cases

frederikbosch commented 6 years ago

Isn’t this a case where we would want to create an interface for processing the queue? And have two impementations? The one there is now and a LimitQueueProcessor.

Regarding the expiry. I think that belongs in a decorator of the queue storage. The processor should not have to check for the validity of a message.

GwendolenLynch commented 6 years ago

OK, all of the above taken on board and changes applied.

Notables:

frederikbosch commented 6 years ago

Looks good, added some minor remarks. What is the usage of the FlushableQueue?

GwendolenLynch commented 6 years ago

Finals added.

What is the usage of the FlushableQueue?

Ah, forgot to update uses-cases, my bad. Literally, so the queues can just be dumped. We see it a lot in cases such as site development where developers will generate dozens, even thousands (let us not talk about the unnamed person who left a generator running on a Friday afternoon and came back on Monday to a dead server) of emails to test a service.

Not fussed if you don't want it in the core library, I can just add it to the bundle. :smile:

frederikbosch commented 6 years ago

Not fussed if you don't want it in the core library, I can just add it to the bundle.

Let's do that.

GwendolenLynch commented 6 years ago

:sparkles: like it never happened :wink:

frederikbosch commented 6 years ago

Added two minor minor remarks. Good to merge afterwards.

frederikbosch commented 6 years ago

Wonderful! Good to see you adding these nice features!