Giter VIP home page Giter VIP logo

Comments (6)

raphaelm avatar raphaelm commented on September 21, 2024

I don't think this can happen exactly as you describe. One ScheduledMail does not represent an individual mail, but rather "one instance of the rule" and once it's sent, it's sent. So once anyone has received the reminder, it will not be sent to individual orders later as well.

Reminders should not be sent for orders that are made after the configured reminder time.

This would only be violated if the entire task for the sending queue is run late, which I think is an acceptable risk?

from pretix.

stapelberg avatar stapelberg commented on September 21, 2024

Thanks for the explanation. I had another look and realized that there is another condition that I had previously missed: reminders are sent spuriously when the subevent is created the day of the subevent (ScheduledMail is “planned”) and then immediately receives an order. The next cron iteration comes along and sends the reminder.

I just tested this series of events in my test instance and was able to reproduce the behavior.

from pretix.

raphaelm avatar raphaelm commented on September 21, 2024

This description makes sense, but I'm not sure I agree it's a problem, plus, it only occurs if the cronjob is unreliable in the first place, or am I missing something there?

from pretix.

stapelberg avatar stapelberg commented on September 21, 2024

it only occurs if the cronjob is unreliable in the first place, or am I missing something there?

No, I don’t think that’s correct. For me, it happens every time, and our cronjob is working correctly.

This description makes sense, but I'm not sure I agree it's a problem

We can certainly live with it. Feel free to close the issue if you think it’s not worth fixing.

Happy new year!

from pretix.

raphaelm avatar raphaelm commented on September 21, 2024

Ah okay, I think I may have not understood it correctly, I focused too much on the time the order comes in, not the creation of the invoice. So the situation is e.g.:

  • You have configured a reminder to be sent out one day before event
  • You create a subevent for Sunday afternoon on Sunday at 8
  • An order comes in immediately after you created the subevent, but before the cronjob marked the email job as done (i.e. 5-10min window)

Correct?

Then yes, adding the order timestamp into the filter would fix this, but would cause different behaviour on delayed cronjob execution (because some orders would get the email, which one could argue as both correct and wrong, I guess).

Another solution could be just triggering the mail to run immediately after subevent creation, correct?

from pretix.

stapelberg avatar stapelberg commented on September 21, 2024

Yes, I think you got the order of events correct, and yes, I think triggering the mail run immediately after subevent creation sounds like a good idea.

That said, I’ll close this issue because we have since moved all email sending away from pretix and into our own frontend, which gives us a lot more control and flexibility. So our need for this is gone, and I’ll let someone else reopen if they ever run into the same problem :)

from pretix.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.