meshx-plugin-sdk 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/meshx-plugin-sdk.rb +5 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cfd1be6ff5ddaf237311e7909bf2f6c5b3751076df76b9bd932acd5646da4052
|
4
|
+
data.tar.gz: 9722a78b4dab746793a659e11efb063ede5b95b6cccf7637a03370ade4612374
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c63edd31526fe9158c90812f29c5cf963d91f6d9356121ad8f3a21b5012fb998482d4a1b7017d4ba1eef82404cbcfe5759e768d40219443418ea9c4ee9f97b26
|
7
|
+
data.tar.gz: 693f0be9334f6445b57e911f8804d5be93fc8ea9623a07597aa74d52119f2a2c66cd1d7787ee6e28fe989433443611f5531e5769826dedc002a61a98cc566647
|
data/lib/meshx-plugin-sdk.rb
CHANGED
@@ -119,6 +119,7 @@ class Controller
|
|
119
119
|
@log = Logger.new(STDOUT)
|
120
120
|
@config = Config.new()
|
121
121
|
@plugin = Plugin.new(@api, @log, @config)
|
122
|
+
@exit_run = false
|
122
123
|
end
|
123
124
|
|
124
125
|
def valid_json?(json)
|
@@ -133,6 +134,7 @@ class Controller
|
|
133
134
|
begin
|
134
135
|
@log.info("calling on_init()")
|
135
136
|
@plugin.on_init()
|
137
|
+
@exit_run = @plugin.exit?()
|
136
138
|
rescue StandardError => e
|
137
139
|
@log.error("error calling on_init(): #{e.message}")
|
138
140
|
end
|
@@ -140,15 +142,16 @@ class Controller
|
|
140
142
|
begin
|
141
143
|
@log.info("calling on_start()")
|
142
144
|
@plugin.on_start()
|
145
|
+
@exit_run = @plugin.exit?()
|
143
146
|
rescue StandardError => e
|
144
147
|
@log.error("error calling on_start(): #{e.message}")
|
145
148
|
end
|
146
149
|
|
147
150
|
keep_reading = true
|
148
151
|
@log.info("starting controller loop")
|
149
|
-
while keep_reading && exit_run == false
|
152
|
+
while keep_reading && @exit_run == false
|
150
153
|
begin
|
151
|
-
exit_run = @plugin.exit?()
|
154
|
+
@exit_run = @plugin.exit?()
|
152
155
|
rtn = @api.get_messages()
|
153
156
|
@log.info("rtn: #{rtn.message} #{rtn.error} #{rtn.exit_code}")
|
154
157
|
# convert message to fileevent
|