Reputation: 2011
I'm running Rake tasks on Heroku with the scheduler add-on, as part of a Rails app. Is there an easy way to get notification emails if a task fails (i.e., raises an exception)? Ideally the email would include the stack trace and also any output generated up to that point by the task.
Upvotes: 5
Views: 755
Reputation: 2011
I ended up fixing my issue more comprehensively by writing an extension to exception_notification for Rake tasks, called notification_exception-rake. I also wrote a blog post specifically about how to use it on Heroku.
Upvotes: 2
Reputation: 3549
There's a great add-on, Airbrake, you might want to look into. It does everything that you're asking for, except output generated by the task. You could get rake task output with another plugin such as Papertrail.
Upvotes: 1