async-container 0.32.1 → 0.33.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 77daf5246650362c76300eb71c5cf11459ff18967e273ba5de5ec6da3816a0f7
4
- data.tar.gz: 9083168708fbce12c26900c2f4fa725845db8c67d7c94016c48ad3adbbdb5b5b
3
+ metadata.gz: 540ced6fa47f3b7a289c62b426b58e9bf0269573eec8b886ce3a97748e2050fe
4
+ data.tar.gz: 188bd801df86b8819989f679e66a4036761a77fe3f438e7121f065cb932c087a
5
5
  SHA512:
6
- metadata.gz: d293fd77c34c01ca982bdaf3be8f1c8216eed1552364b036782ecd12c259053270e837a95027374c9e8973d590043329bd00b31d1efe33743f0e5bf0e8af89a8
7
- data.tar.gz: 7a7073417f66670f9bc686816bfdf35a290f3bc590a9396b1465f6dd1a7c2f27a679145dbbd487c2547ae69d0ae440f65b85a5d7fc63f72cb4cba5df1ea824ed
6
+ metadata.gz: 9da0dde241b6b11e5635e4dc899ea3112b64d789602f5d76a26d7596fad0d63596c8e3ffe7dd209a254ea3b8e27693d2345e9725d86bf3bcb5af5630dedd29bb
7
+ data.tar.gz: 27db38943290ce92173ec0df1262f8803032f0068ad0ca17c5551d919f5a71d6f555bbc5be9b6d074df9bd23da94da8be042d13d24e4755b606087543167d93b
checksums.yaml.gz.sig CHANGED
Binary file
@@ -51,9 +51,9 @@ module Async
51
51
 
52
52
  @state = {}
53
53
 
54
- @statistics = Statistics.new
55
- @keyed = {}
56
54
  @policy = policy
55
+ @statistics = @policy.make_statistics
56
+ @keyed = {}
57
57
  end
58
58
 
59
59
  # @attribute [Group] The group of running children instances.
@@ -92,6 +92,13 @@ module Async
92
92
  status&.exitstatus
93
93
  end
94
94
 
95
+ # Create statistics for a container.
96
+ # Can be overridden by subclasses to customize the statistics window.
97
+ # @returns [Statistics] A new statistics instance.
98
+ def make_statistics
99
+ Statistics.new
100
+ end
101
+
95
102
  # The default policy instance.
96
103
  DEFAULT = self.new.freeze
97
104
  end
@@ -5,6 +5,6 @@
5
5
 
6
6
  module Async
7
7
  module Container
8
- VERSION = "0.32.1"
8
+ VERSION = "0.33.0"
9
9
  end
10
10
  end
data/readme.md CHANGED
@@ -28,6 +28,10 @@ Please see the [project documentation](https://socketry.github.io/async-containe
28
28
 
29
29
  Please see the [project releases](https://socketry.github.io/async-container/releases/index) for all releases.
30
30
 
31
+ ### v0.33.0
32
+
33
+ - Add `Policy#make_statistics` to allow policies to customize statistics initialization.
34
+
31
35
  ### v0.32.1
32
36
 
33
37
  - Expose `Async::Container::Controller` `#notify`, `#container_class`, and `#graceful_stop` for testing.
@@ -70,10 +74,6 @@ Please see the [project releases](https://socketry.github.io/async-container/rel
70
74
  - Add log for starting child, including container statistics.
71
75
  - Don't try to (log) "terminate 0 child processes" if there are none.
72
76
 
73
- ### v0.27.2
74
-
75
- - More logging, especially around failure cases.
76
-
77
77
  ## Contributing
78
78
 
79
79
  We welcome contributions to this project.
data/releases.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Releases
2
2
 
3
+ ## v0.33.0
4
+
5
+ - Add `Policy#make_statistics` to allow policies to customize statistics initialization.
6
+
3
7
  ## v0.32.1
4
8
 
5
9
  - Expose `Async::Container::Controller` `#notify`, `#container_class`, and `#graceful_stop` for testing.
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: async-container
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.32.1
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Williams
metadata.gz.sig CHANGED
Binary file