lib/sqreen/callbacks.rb in sqreen-1.15.0-java vs lib/sqreen/callbacks.rb in sqreen-1.15.1

- old
+ new

@@ -34,10 +34,12 @@ # - { :status => :override }: eat exception # - { :retry => :retry }: try the block again # # CB can also declare that they are whitelisted and should not be run at the moment. + DEFAULT_PRIORITY = 100 + attr_reader :klass, :method attr_reader :overtimeable def initialize(klass, method) @method = method @@ -51,9 +53,14 @@ raise(Sqreen::Exception, 'No callback provided') unless @has_pre || @has_post || @has_failing end def whitelisted? false + end + + # the lower, the closer to the beginning of the list + def priority + DEFAULT_PRIORITY end def pre? @has_pre end