I am looking for some ideas on how I can create some way of error alerts for failed rake tasks and how some of you are handling something like this. Basically if a rake tasks fails I would like to have some kind of alert by email that the task did not complete. Are there any services that your using to do something like this? Currently I am running these tasks via cron. Thank You -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hello, On Friday, May 18, 2012 2:24:19 AM UTC-3, gerbdla wrote:> > I am looking for some ideas on how I can create some way of error > alerts for failed rake tasks and how some of you are handling > something like this. Basically if a rake tasks fails I would like to > have some kind of alert by email that the task did not complete. Are > there any services that your using to do something like this? > Currently > I am running these tasks via cron. > >For that to work you will need to provide "standard_exception_handling" method that and extend Rake.application The following Gist is what I used with one application to send errors to Exceptional.io: https://gist.github.com/2725772 You could replace the exceptional.io handling and go whatever you want. Hope that helps -- Luis Lavena -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/mgkfe05gOQoJ. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Thu, May 17, 2012 at 10:24 PM, gerbdla <gerbdla-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I am looking for some ideas on how I can create some way of error > alerts for failed rake tasks and how some of you are handling > something like this. Basically if a rake tasks fails I would like to > have some kind of alert by email that the task did not complete. Are > there any services that your using to do something like this? > Currently > I am running these tasks via cron.Reading the cron(8) man page -- ".... When executing commands, any output is mailed to the owner of the crontab (or to the user named in the MAILTO environment variable in the crontab, if such exists). As long as what you''re doing dumps errors to stdout or stderr, you should receive an email about it :-) -- Hassan Schroeder ------------------------ hassan.schroeder-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org http://about.me/hassanschroeder twitter: @hassan -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.