class Chantier::FailurePolicies::None
A very basic failure policy that will do nothing at all. It will always answer “nil” to limit_reached?, therefore allowing the works to proceed indefinitely. By overriding the four main methods on it you can control the policy further.
Note that all calls to arm!, failure!, success! and limit_reached? are automatically protected by a Mutex - you don't need to set one up yourself.
Public Instance Methods
arm!()
click to toggle source
Start counting the failures (will be triggered on the first job). You can manually call this to reset the object the object to the initial state (reset error counts)
# File lib/failure_policies.rb, line 13 def arm! end
failure!()
click to toggle source
Increment the failure counter
# File lib/failure_policies.rb, line 17 def failure! end
limit_reached?()
click to toggle source
Tells whether the failure policy has been triggered. Return something falsey from here if everything is in order
# File lib/failure_policies.rb, line 26 def limit_reached? end
success!()
click to toggle source
Increment the success counter
# File lib/failure_policies.rb, line 21 def success! end