my application sends a batch of custom emails every day using mailgun (an email API service). I have a producer worker scheduled to run daily, and all does is query the database for the unique configurations/templates, and adds the jobs to redis. Then my consumer worker sends the requests to mailgun and acks them. It works well, but what's missing is statistics application-side. I want to show how many emails were sent, how many failed, etc. Where should I pull that data from?
I can imagine having the consumer put the status into the application's database before acking the message, or perhaps using mailgun's API for the stats..? Or is it common to somehow get stats from redis?
Thanks for your time