We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 92819fd commit 12ca140Copy full SHA for 12ca140
lib/travis/hub/service/state_update.rb
@@ -24,6 +24,8 @@ def key
24
25
include Helper::Context
26
27
+ OUT_OF_BAND = [:cancel, :restart]
28
+
29
MSGS = {
30
missing: 'Received state update (%p) with no count for job id=%p, last known count: %p.',
31
ordered: 'Received state update %p (%p) for job id=%p, last known count: %p',
@@ -32,6 +34,7 @@ def key
32
34
}
33
35
36
def apply?
37
+ return true if out_of_band?
38
return missing unless given?
39
apply = ordered? ? ordered : unordered
40
return true unless ENV['UPDATE_COUNT']
@@ -40,6 +43,10 @@ def apply?
43
41
44
private
42
45
46
+ def out_of_band?
47
+ OUT_OF_BAND.include?(event)
48
+ end
49
50
def given?
51
!count.nil?
52
end
0 commit comments