Skip to content

Commit

Permalink
remove exception notifier problem
Browse files Browse the repository at this point in the history
  • Loading branch information
Robert Guthrie committed Dec 12, 2013
1 parent 88f87fa commit b58d4ce
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions app/services/motion_service.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,6 @@ def self.close_all_lapsed_motions
Motion.lapsed_but_not_closed.each do |motion|
close(motion)
end
rescue Exception => e
# why the fart won't heroku let us know a cronjob failed?
ExceptionNotifier.notify_exception(
UnacceptableMotionError.new(motion, e),
env: request.env
)
end

def self.close(motion)
Expand Down Expand Up @@ -55,18 +49,4 @@ def self.update_outcome(motion, motion_params, user)

Events::MotionOutcomeUpdated.publish!(motion, user)
end

class UnacceptableMotionError < StandardError
def initialize(motion, exception)
@motion = motion
@exception = exception
end

def message
"Motion close cron job failed. This is going to fuck up
all the motions waiting to close for ever until fixed,
so fix immediately, Jesus/Jesse.
#{motion.inspect} #{exception.inspect}"
end
end
end

0 comments on commit b58d4ce

Please sign in to comment.