Created
October 27, 2016 13:08
-
-
Save matsimitsu/ac250382a8b43f44a7f0ff85833f56d0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "appsignal" | |
Appsignal.config = Appsignal::Config.new( | |
File.expand_path(File.dirname(__FILE__)), | |
"development" | |
) | |
Appsignal.start | |
class DailyProcessor | |
def self.process_today | |
# Randomly raise an error | |
raise 'moo' if rand(2) == 1 | |
rescue => e | |
Appsignal.send_error(e) | |
end | |
end | |
DailyProcessor.process_today | |
Appsignal.stop |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment