Regarding the ``delay``, it makes sense to make it block there to count non-failed tasks. About moving that counter up to the 2 report's tasks, I would keep the counter in all 3 places.

I don't have any strong feelings about that, but the initial idea for that PR was to have a way to see if we practically send any email for each periodic task run.