nikhaldi / exception_notification-rake

Sends mail upon failures in Rake tasks
MIT License
39 stars 14 forks source link

Notify of errors in runner commands #34

Open TylerRick opened 1 year ago

TylerRick commented 1 year ago

Resolves #33

Depends on / based on https://github.com/nikhaldi/exception_notification-rake/pull/27, which aligns things more with the nice, organized way that Airbrake does things in their railtie.

I would have liked to include the full runner command string in the data hash so it's visible in the exception notification. Unfortunately, it appears that ARGV is not available from runner hook, so we can't reconstruct the full runner command string like we did with reconstruct_command_line.

I've worked around this before, like this in the paper_trail-rails gem, but it wasn't as clean as I'd like (basically you have to put your override file at lib/rails/commands/runner/runner_command.rb to get it to be loaded instead of the version from railties).

TylerRick commented 1 year ago

FYI: This PR (and this gem in general) may be redundant now that https://github.com/smartinez87/exception_notification/pull/536 has been merged