deploy-agent 1.0.3 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/deploy_agent/agent.rb +10 -4
- data/lib/deploy_agent/server_connection.rb +5 -0
- metadata +19 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3aadc6e314dba14514c9015a73252decf65bb13f
|
4
|
+
data.tar.gz: fc71bae393b1edeff76eaee62e131f62f49fe989
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 10e1cd86b9db41700f5d9aa7013f12af2e6d159f6ba8e2645e46c8691a36ca33fba613e56540bcb7a53aa8d0c3d1d8e91a3a3fe59994a7c0d4caf45a8478daa6
|
7
|
+
data.tar.gz: cbbb62930a9504f883e51e9fca32ee824760902d333cd28de98a92eee7d645631d714dc86490b0d786848a48ea7a7b124bb5b985a35e05152a56d285711bb13f
|
data/lib/deploy_agent/agent.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
gem 'nio4r', '
|
1
|
+
gem 'nio4r', '2.1.0'
|
2
|
+
gem 'timers', '4.1.2'
|
2
3
|
require 'nio'
|
4
|
+
require 'timers'
|
3
5
|
require 'logger'
|
4
6
|
|
5
7
|
module DeployAgent
|
@@ -7,14 +9,18 @@ module DeployAgent
|
|
7
9
|
|
8
10
|
def run
|
9
11
|
nio_selector = NIO::Selector.new
|
12
|
+
timers = Timers::Group.new
|
10
13
|
target = ENV['DEPLOY_AGENT_PROXY_IP'] || 'agent.deployhq.com'
|
11
|
-
ServerConnection.new(self, target, nio_selector, !ENV['DEPLOY_AGENT_NOVERIFY'])
|
12
|
-
|
14
|
+
server_connection = ServerConnection.new(self, target, nio_selector, !ENV['DEPLOY_AGENT_NOVERIFY'])
|
15
|
+
timers.every(60) { server_connection.keepalive }
|
13
16
|
loop do
|
14
|
-
|
17
|
+
wait_interval = timers.wait_interval
|
18
|
+
wait_interval = 0 if wait_interval < 0
|
19
|
+
nio_selector.select(wait_interval) do |monitor|
|
15
20
|
monitor.value.rx_data if monitor.readable?
|
16
21
|
monitor.value.tx_data if monitor.writeable?
|
17
22
|
end
|
23
|
+
timers.fire
|
18
24
|
end
|
19
25
|
rescue ServerConnection::ServerDisconnected
|
20
26
|
retry
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: deploy-agent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- aTech Media
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nio4r
|
@@ -16,14 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: 2.1.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
26
|
+
version: 2.1.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: timers
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - '='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 4.1.2
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 4.1.2
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rb-readline
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -74,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
88
|
version: '0'
|
75
89
|
requirements: []
|
76
90
|
rubyforge_project:
|
77
|
-
rubygems_version: 2.6.
|
91
|
+
rubygems_version: 2.6.11
|
78
92
|
signing_key:
|
79
93
|
specification_version: 4
|
80
94
|
summary: The Deploy agent
|