apiotics 0.1.126 → 0.1.127
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apiotics/insert.rb +19 -21
- data/lib/apiotics/server.rb +1 -1
- data/lib/apiotics/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f055a06a1fffb56569e7858bf4729fb6999f56b
|
4
|
+
data.tar.gz: 2e0838b96458762a5d686cbb5b4841509d28a960
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02ffcc0192573aa261a62029eac9b2685a460834b1719a2bbf5e5d92f9b7f05a607edc733e8fee79022f1f7dd880039417876c56d53c9e85c62a3ed92e4db73f
|
7
|
+
data.tar.gz: 704316eb1ca9f586163351e19278e8dca7672e08deb41317788d660385ac28c876d195b443928df44008a978de1f5d65560fc046960796ee4ff91f42dd6e213f
|
data/lib/apiotics/insert.rb
CHANGED
@@ -15,29 +15,27 @@ module Apiotics
|
|
15
15
|
@timestamp = hash["timestamp"]
|
16
16
|
@status = hash["status"]
|
17
17
|
@valid = true
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
@
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
@record.send("#{k}_status=".to_sym, @status)
|
29
|
-
end
|
30
|
-
end
|
31
|
-
if @action == "set-complete"
|
32
|
-
set_complete
|
33
|
-
elsif @action == "set-request-ack"
|
34
|
-
set_ack
|
35
|
-
elsif @action == "get-ack"
|
36
|
-
get_ack
|
18
|
+
begin
|
19
|
+
find_record
|
20
|
+
@methods.each do |k,v|
|
21
|
+
@type = @record.class.columns_hash[k].type
|
22
|
+
#change_value
|
23
|
+
@record.send("#{k}=".to_sym, v)
|
24
|
+
unless Apiotics.configuration.reduced_metadata == true
|
25
|
+
@record.send(("#{k}_action=").to_sym, @action)
|
26
|
+
@record.send("#{k}_timestamp=".to_sym, @timestamp)
|
27
|
+
@record.send("#{k}_status=".to_sym, @status)
|
37
28
|
end
|
38
|
-
rescue
|
39
|
-
@valid = false
|
40
29
|
end
|
30
|
+
if @action == "set-complete"
|
31
|
+
set_complete
|
32
|
+
elsif @action == "set-request-ack"
|
33
|
+
set_ack
|
34
|
+
elsif @action == "get-ack"
|
35
|
+
get_ack
|
36
|
+
end
|
37
|
+
rescue
|
38
|
+
@valid = false
|
41
39
|
end
|
42
40
|
end
|
43
41
|
|
data/lib/apiotics/server.rb
CHANGED
@@ -111,7 +111,7 @@ module Apiotics
|
|
111
111
|
puts "Message received: " + msg
|
112
112
|
msg_hash = Apiotics::Parse.message(msg)
|
113
113
|
#puts "Driver: " + msg_hash["driver"]
|
114
|
-
unless msg_hash["driver"] == "Core::Heartbeat"
|
114
|
+
unless msg_hash["driver"] == "Core::Heartbeat" || msg_hash["error"] != nil
|
115
115
|
r = Apiotics::Insert.new(msg_hash)
|
116
116
|
if r.valid == true
|
117
117
|
if r.action == "set-request-ack" || r.action == "set-complete" || r.action == "get-ack"
|
data/lib/apiotics/version.rb
CHANGED