apiotics 0.1.94 → 0.1.95
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/apiotics/configuration.rb +2 -1
- data/lib/apiotics/server.rb +4 -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: 005d4dfbb6b4341d90f2d0fcc00ad0a53b5ebf8b
|
4
|
+
data.tar.gz: 573fd4d7d670b7cebbefe2ca3f1427dec3140f47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db7792ebd63839949a0861797acd780c7c743d08feab19c22a9b307a40fd313afeec3fe8ed8bd49b296ff780e936b1cce97553975116373fb3fe53e1235ce8e5
|
7
|
+
data.tar.gz: 163b85e1ecac97d9beadfa1b1a8cd7756ef71e537f5cdd3196b979795ef5d9a9a31e038e3011ae9415d74c4a26a0f0d902056b44b4f37a21356dfb3b0b727bbe
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Apiotics
|
2
2
|
class Configuration
|
3
3
|
|
4
|
-
attr_accessor :public_key, :private_key, :local_logging, :targets, :local_port, :server, :server_port, :portal, :push, :tls, :verify_peer, :handshake, :parents, :reduced_metadata, :redis_comms_connection, :interface_kinds, :max_missed_heartbeats, :heartbeat_interval
|
4
|
+
attr_accessor :public_key, :private_key, :local_logging, :targets, :local_port, :server, :server_port, :portal, :push, :tls, :verify_peer, :handshake, :parents, :reduced_metadata, :redis_comms_connection, :interface_kinds, :max_missed_heartbeats, :heartbeat_interval, :create_heartbeat_error
|
5
5
|
|
6
6
|
def initialize
|
7
7
|
@public_key = nil
|
@@ -21,6 +21,7 @@ module Apiotics
|
|
21
21
|
@redis_comms_connection = false
|
22
22
|
@max_missed_heartbeats = 3
|
23
23
|
@heartbeat_interval = 5
|
24
|
+
@create_heartbeat_error = false
|
24
25
|
@interface_kinds = {
|
25
26
|
"string" => "string",
|
26
27
|
"text" => "string",
|
data/lib/apiotics/server.rb
CHANGED
@@ -164,7 +164,10 @@ module Apiotics
|
|
164
164
|
Thread.new do
|
165
165
|
loop do
|
166
166
|
heartbeat["interface"] = DateTime.now.to_i.to_s
|
167
|
-
|
167
|
+
unless Apiotics.configuration.create_heartbeat_error == true
|
168
|
+
heartbeat_msg = Apiotics::Parse.message(heartbeat)
|
169
|
+
end
|
170
|
+
self.send(heartbeat_msg)
|
168
171
|
self.monitor_heartbeat(heartbeat)
|
169
172
|
sleep Apiotics.configuration.heartbeat_interval
|
170
173
|
end
|
data/lib/apiotics/version.rb
CHANGED