apiotics 0.1.91 → 0.1.92

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
  SHA1:
3
- metadata.gz: b31ad466b84f50973745b403b4ac5ddec4ed902b
4
- data.tar.gz: b73a87608753aa15394f2e4b0e9cf780628f7163
3
+ metadata.gz: 848fddae9f407adbe9dd7f6c3e68ddd43b3ec5de
4
+ data.tar.gz: 21f8df6427cb0022234c60dec519c3fb1c6474c3
5
5
  SHA512:
6
- metadata.gz: 2d87a3c583ef9038958d6b8505f947ee86a7e649f7933ec35be4f245f15dd10829ba3085899eb3845111ed73d35ba6bbcd9eb5cb57f1ec37ae56191957ed5c4d
7
- data.tar.gz: a39ec503fa05723a6969ea3e85abdcd1c8376e740373094c02080545477e90303e89e6e134b698e115f4ab41b3077e414f739e8b475bf7b074463e0764484670
6
+ metadata.gz: 1f6aa325de320d778a3561aa492f1030351f6247b6497f23991d0257009c08b150b3cf6ea9ed531ec2addb1b2d6f1393381b5ef43a67c7f4fc84934067803bb4
7
+ data.tar.gz: ba66b668e4803335290167e55cf7ba8ffe89c6fc752ccece5c8478dcbd3d0bd8b6d797a99d74729d37ddaa4a6ad7f5659fa23837058c42e06d2da286a71f7c0e
@@ -69,7 +69,6 @@ module Apiotics
69
69
  @server = server
70
70
  @localport = Apiotics.configuration.local_port
71
71
  listen_remote
72
- listen_local
73
72
  @heartbeat_state = Hash.new
74
73
  heartbeat = {
75
74
  "action" => "set-request",
@@ -78,7 +77,7 @@ module Apiotics
78
77
  "interface" => nil
79
78
  }
80
79
  send_heartbeat(heartbeat)
81
- # need to write a loop that throws an error if the heartbeat is not received back.
80
+ listen_local
82
81
  end
83
82
 
84
83
  def send(msg)
@@ -162,11 +161,14 @@ module Apiotics
162
161
  end
163
162
 
164
163
  def send_heartbeat(heartbeat)
165
- loop do
166
- heartbeat["interface"] = DateTime.now.to_i
167
- self.send(heartbeat)
168
- self.monitor_heartbeat(heartbeat)
169
- sleep Apiotics.configuration.heartbeat_interval
164
+ Thread.new do
165
+ loop do
166
+ heartbeat["interface"] = DateTime.now.to_i
167
+ self.send(heartbeat)
168
+ self.monitor_heartbeat(heartbeat)
169
+ sleep Apiotics.configuration.heartbeat_interval
170
+ end
171
+ ActiveRecord::Base.connection.close
170
172
  end
171
173
  end
172
174
 
@@ -1,3 +1,3 @@
1
1
  module Apiotics
2
- VERSION = '0.1.91'
2
+ VERSION = '0.1.92'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiotics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.91
4
+ version: 0.1.92
5
5
  platform: ruby
6
6
  authors:
7
7
  - MicroArx Corporation