meshx-plugin-sdk 0.0.8 → 0.0.10
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 +12 -3
- 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: 90cff424f122f71ddbd6c6c4438d00a02760a5816d8992105d2e21a51cd0d7b9
|
4
|
+
data.tar.gz: 19b91e23b767c2a6b6a770e7bbaae7af2253ae1f35a9b9d400da848379cd539d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0adbbdf1c528f17856bf4c81a0c865af4adb3d2c564f79ce44a9be082af4869098d4200924c8c45f36346076bb0167da403312b4c2152ddb6aecfd0bd4c86803
|
7
|
+
data.tar.gz: 25c47100d7b07ff088e5fd77ab9141d0d560f7fdd7d6c67ea37ce0bc5149fb9df6c04f8dd19687129d902cf3d492514fdd27aeda71195d8c15ec44d032e84495
|
data/lib/meshx-plugin-sdk.rb
CHANGED
@@ -129,7 +129,7 @@ class Controller
|
|
129
129
|
end
|
130
130
|
|
131
131
|
def run()
|
132
|
-
exit_run = false
|
132
|
+
@exit_run = false
|
133
133
|
begin
|
134
134
|
@log.info("calling on_init()")
|
135
135
|
@plugin.on_init()
|
@@ -140,15 +140,15 @@ class Controller
|
|
140
140
|
begin
|
141
141
|
@log.info("calling on_start()")
|
142
142
|
@plugin.on_start()
|
143
|
+
|
143
144
|
rescue StandardError => e
|
144
145
|
@log.error("error calling on_start(): #{e.message}")
|
145
146
|
end
|
146
147
|
|
147
148
|
keep_reading = true
|
148
149
|
@log.info("starting controller loop")
|
149
|
-
while keep_reading &&
|
150
|
+
while keep_reading && (@api.get_exit() == false)
|
150
151
|
begin
|
151
|
-
exit_run = @plugin.exit?()
|
152
152
|
rtn = @api.get_messages()
|
153
153
|
@log.info("rtn: #{rtn.message} #{rtn.error} #{rtn.exit_code}")
|
154
154
|
# convert message to fileevent
|
@@ -334,6 +334,15 @@ end
|
|
334
334
|
|
335
335
|
class FoundationApi
|
336
336
|
def initialize()
|
337
|
+
@exit = false
|
338
|
+
end
|
339
|
+
|
340
|
+
def exit()
|
341
|
+
@exit = true
|
342
|
+
end
|
343
|
+
|
344
|
+
def get_exit()
|
345
|
+
return @exit
|
337
346
|
end
|
338
347
|
|
339
348
|
def pase_response(response)
|