async-container-supervisor 0.5.2 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/bake/async/container/supervisor.rb +8 -0
- data/lib/async/container/supervisor/dispatchable.rb +0 -2
- data/lib/async/container/supervisor/memory_monitor.rb +5 -5
- data/lib/async/container/supervisor/server.rb +0 -2
- data/lib/async/container/supervisor/version.rb +1 -1
- data/readme.md +4 -0
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +2 -30
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0534a1e50c30335199c89b543208bf81d9bd03cc4f48466823907a4c0a6103c5
|
|
4
|
+
data.tar.gz: 5e9520963dd453e093d26bd4809a629fc6fe9bcc483bf969246b8f3bc3e3e2cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ae89477d2957e756a2fd1fe28867d8f78254ddb43de232d5f2514c3040ba9f5fcce4c6533bd31fa7d03505a14e232ae31b853068e2e80a4d1c30331bc93698e1
|
|
7
|
+
data.tar.gz: 2f351b38c9ee9c2d603e56cb7dbf63f602660b65db6a7950db67c105d34e456dbc2f7aa2105f0ce46eb99a4c2b9c5efd6a08caa1c88e863f3980cdbef3f6c399
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -9,12 +9,20 @@ def initialize(...)
|
|
|
9
9
|
require "async/container/supervisor"
|
|
10
10
|
end
|
|
11
11
|
|
|
12
|
+
# Restart the container, typically causing it to exit (the parent process should then restart it).
|
|
12
13
|
def restart
|
|
13
14
|
client do |connection|
|
|
14
15
|
connection.call(do: :restart)
|
|
15
16
|
end
|
|
16
17
|
end
|
|
17
18
|
|
|
19
|
+
# Reload the services gracefully, allowing them to reconfigure without dropping connections.
|
|
20
|
+
def reload
|
|
21
|
+
client do |connection|
|
|
22
|
+
connection.call(do: :restart, signal: :HUP)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
18
26
|
def status
|
|
19
27
|
client do |connection|
|
|
20
28
|
connection.call(do: :status)
|
|
@@ -34,12 +34,12 @@ module Async
|
|
|
34
34
|
|
|
35
35
|
# Register the connection (worker) with the memory monitor.
|
|
36
36
|
def register(connection)
|
|
37
|
-
Console.debug(self, "Registering connection
|
|
37
|
+
Console.debug(self, "Registering connection.", connection: connection, state: connection.state)
|
|
38
38
|
if process_id = connection.state[:process_id]
|
|
39
39
|
connections = @processes[process_id]
|
|
40
40
|
|
|
41
41
|
if connections.empty?
|
|
42
|
-
Console.debug(self, "Registering process
|
|
42
|
+
Console.debug(self, "Registering process.", child: {process_id: process_id})
|
|
43
43
|
self.add(process_id)
|
|
44
44
|
end
|
|
45
45
|
|
|
@@ -55,7 +55,7 @@ module Async
|
|
|
55
55
|
connections.delete(connection)
|
|
56
56
|
|
|
57
57
|
if connections.empty?
|
|
58
|
-
Console.debug(self, "Removing process
|
|
58
|
+
Console.debug(self, "Removing process.", child: {process_id: process_id})
|
|
59
59
|
@cluster.remove(process_id)
|
|
60
60
|
end
|
|
61
61
|
end
|
|
@@ -74,7 +74,7 @@ module Async
|
|
|
74
74
|
# @parameter monitor [Memory::Leak::Monitor] The monitor that detected the memory leak.
|
|
75
75
|
# @returns [Boolean] True if the process was killed.
|
|
76
76
|
def memory_leak_detected(process_id, monitor)
|
|
77
|
-
Console.info(self, "Killing process
|
|
77
|
+
Console.info(self, "Killing process!", child: {process_id: process_id})
|
|
78
78
|
Process.kill(:INT, process_id)
|
|
79
79
|
|
|
80
80
|
true
|
|
@@ -88,7 +88,7 @@ module Async
|
|
|
88
88
|
while true
|
|
89
89
|
# This block must return true if the process was killed.
|
|
90
90
|
@cluster.check! do |process_id, monitor|
|
|
91
|
-
Console.error(self, "Memory leak detected
|
|
91
|
+
Console.error(self, "Memory leak detected!", child: {process_id: process_id}, monitor: monitor)
|
|
92
92
|
memory_leak_detected(process_id, monitor)
|
|
93
93
|
end
|
|
94
94
|
|
data/readme.md
CHANGED
|
@@ -20,6 +20,10 @@ Please see the [project documentation](https://socketry.github.io/async-containe
|
|
|
20
20
|
|
|
21
21
|
Please see the [project releases](https://socketry.github.io/async-container-supervisor/releases/index) for all releases.
|
|
22
22
|
|
|
23
|
+
### v0.6.0
|
|
24
|
+
|
|
25
|
+
- Add `async:container:supervisor:reload` command to restart the container (blue/green deployment).
|
|
26
|
+
|
|
23
27
|
### v0.1.0
|
|
24
28
|
|
|
25
29
|
- Initial implementation.
|
data/releases.md
CHANGED
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: async-container-supervisor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.6.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Samuel Williams
|
|
@@ -38,20 +38,6 @@ cert_chain:
|
|
|
38
38
|
-----END CERTIFICATE-----
|
|
39
39
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
40
40
|
dependencies:
|
|
41
|
-
- !ruby/object:Gem::Dependency
|
|
42
|
-
name: async-container
|
|
43
|
-
requirement: !ruby/object:Gem::Requirement
|
|
44
|
-
requirements:
|
|
45
|
-
- - "~>"
|
|
46
|
-
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0.22'
|
|
48
|
-
type: :runtime
|
|
49
|
-
prerelease: false
|
|
50
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
-
requirements:
|
|
52
|
-
- - "~>"
|
|
53
|
-
- !ruby/object:Gem::Version
|
|
54
|
-
version: '0.22'
|
|
55
41
|
- !ruby/object:Gem::Dependency
|
|
56
42
|
name: async-service
|
|
57
43
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -80,20 +66,6 @@ dependencies:
|
|
|
80
66
|
- - ">="
|
|
81
67
|
- !ruby/object:Gem::Version
|
|
82
68
|
version: '0'
|
|
83
|
-
- !ruby/object:Gem::Dependency
|
|
84
|
-
name: io-stream
|
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
|
86
|
-
requirements:
|
|
87
|
-
- - ">="
|
|
88
|
-
- !ruby/object:Gem::Version
|
|
89
|
-
version: '0'
|
|
90
|
-
type: :runtime
|
|
91
|
-
prerelease: false
|
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
-
requirements:
|
|
94
|
-
- - ">="
|
|
95
|
-
- !ruby/object:Gem::Version
|
|
96
|
-
version: '0'
|
|
97
69
|
- !ruby/object:Gem::Dependency
|
|
98
70
|
name: memory-leak
|
|
99
71
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -148,7 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
148
120
|
- !ruby/object:Gem::Version
|
|
149
121
|
version: '0'
|
|
150
122
|
requirements: []
|
|
151
|
-
rubygems_version: 3.7.
|
|
123
|
+
rubygems_version: 3.7.2
|
|
152
124
|
specification_version: 4
|
|
153
125
|
summary: A supervisor for managing multiple container processes.
|
|
154
126
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|