I think it would be better to just store jobs in an array and implement this in the `flush` method. It's what `flush` was made for, for making expensive operations in one go, after the response was sent.