[openstreetmap/openstreetmap-website] Send trace import result notification immediately (#2313)
Andy Allan
notifications at github.com
Tue Jul 16 10:52:37 UTC 2019
Looks fine to me - I'm happy with emails being delievered synchronously since the task is being done asynchronously.
It's a pity this problem wasn't picked up in the tests, but that's because there the jobs are run immediately. I could design some kind of state machine for this - only delete when pending notifications have been sent - but that seems cumbersome.
Thinking about it some more, we could redesign the Notifier.gpx_failure calls to take the data they need, rather than a trace object. See https://ricostacruz.com/til/rails-mailer-race-conditions . But I'm not sure if it's worth the trade-off in this situation.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/2313#issuecomment-511767196
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20190716/e66066a6/attachment.html>
More information about the rails-dev
mailing list