huginn_netlify_status_agent 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e24159895b4a17f75bc5a7429562f75614ceed2e32da4a4c0d9e52ce3da8f34f
|
4
|
+
data.tar.gz: d7ec7c18ff500e5ae1f8566ef91b5d065b86e3321ad443d5e2a9940facc4955a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0da55ec0ce2dfb27cbfe44907fa02523243bd2586427923a53b20e795a46a887bc5dcb8101c1931baa0cb7f0cae3cd4ddb768c6e1c8ead60b080f7314fe3f5f3
|
7
|
+
data.tar.gz: 38a89eafadef56b39d9240befe5cf80e0205e9aa5e80e90cc93023afeed6ebd0dc5ece0a2bd5ea7288ea955373dcaf5e11ba419948a48dca1bb16a2aa60eaf4e
|
@@ -12,6 +12,8 @@ module Agents
|
|
12
12
|
|
13
13
|
The `debug` can add verbosity.
|
14
14
|
|
15
|
+
`changes_only` is only used to emit event about a currency's change.
|
16
|
+
|
15
17
|
`expected_receive_period_in_days` is used to determine if the Agent is working. Set it to the maximum number of days
|
16
18
|
that you anticipate passing without this Agent receiving an incoming Event.
|
17
19
|
MD
|
@@ -36,6 +38,7 @@ module Agents
|
|
36
38
|
}
|
37
39
|
end
|
38
40
|
|
41
|
+
form_configurable :debug, type: :boolean
|
39
42
|
form_configurable :expected_receive_period_in_days, type: :string
|
40
43
|
form_configurable :changes_only, type: :boolean
|
41
44
|
|
@@ -69,7 +72,6 @@ module Agents
|
|
69
72
|
log "request status : #{code}"
|
70
73
|
|
71
74
|
if interpolated['debug'] == 'true'
|
72
|
-
log "request status : #{code}"
|
73
75
|
log "body"
|
74
76
|
log body
|
75
77
|
end
|
@@ -89,8 +91,12 @@ module Agents
|
|
89
91
|
|
90
92
|
if interpolated['changes_only'] == 'true'
|
91
93
|
if payload != memory['last_status']
|
94
|
+
if memory['last_status'].nil?
|
95
|
+
create_event payload: event
|
96
|
+
elsif !memory['last_status']['status'].nil? and memory['last_status']['status'].present? and payload['status'] != memory['last_status']['status']
|
97
|
+
create_event payload: event
|
98
|
+
end
|
92
99
|
memory['last_status'] = payload
|
93
|
-
create_event payload: event
|
94
100
|
end
|
95
101
|
else
|
96
102
|
create_event payload: event
|