copy_tuner_client 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/lib/copy_tuner_client/poller.rb +1 -0
- data/lib/copy_tuner_client/process_guard.rb +16 -6
- data/lib/copy_tuner_client/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 03ba0b085f868890879331c827dc5b536dd7ab60
|
4
|
+
data.tar.gz: 87fde9370a787494eee210acef172e308d3bd712
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b7224992276e3886e74346a54b9de1facf6dbf5140b0da2c29ded50534f61e820525cd1dce5ef865213a496bad59f34a17bf71a797f6010620557c3613fda02b
|
7
|
+
data.tar.gz: 5bc71e6e6643e52038c4065e2dd5357b605875720b141f7dde522caa1dd335f6934bf612840abf805217a7da5584fb1a326d5a5f64c5ffe5339c2a6307015b4c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -42,7 +42,7 @@ module CopyTunerClient
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def puma_spawner?
|
45
|
-
defined?(Puma::
|
45
|
+
defined?(Puma::Runner) && $0.include?('puma')
|
46
46
|
end
|
47
47
|
|
48
48
|
def delayed_job_spawner?
|
@@ -97,15 +97,25 @@ module CopyTunerClient
|
|
97
97
|
end
|
98
98
|
|
99
99
|
def register_puma_hook
|
100
|
-
|
100
|
+
# If Puma is clustered mode without preload_app, this method is called on worker process.
|
101
|
+
# Just start poller and return.
|
102
|
+
if $0.include?('cluster worker')
|
103
|
+
@logger.info('Puma would be clustered mode without preload_app')
|
104
|
+
@poller.start
|
105
|
+
return
|
106
|
+
end
|
107
|
+
|
108
|
+
@logger.info('Register Puma fork hook')
|
109
|
+
# If Puma is clustered mode with preload_app, this method is called before fork.
|
110
|
+
# Delay poller start until Puma::Runner#start_server which is called on worker process.
|
101
111
|
poller = @poller
|
102
|
-
|
103
|
-
|
104
|
-
define_method :worker do |index, master|
|
112
|
+
hook_module = Module.new do
|
113
|
+
define_method :start_server do
|
105
114
|
poller.start
|
106
|
-
|
115
|
+
super()
|
107
116
|
end
|
108
117
|
end
|
118
|
+
Puma::Runner.prepend hook_module
|
109
119
|
end
|
110
120
|
|
111
121
|
def register_exit_hooks
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copy_tuner_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- SonicGarden
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-08-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|