async-service-supervisor 0.17.0 → 0.18.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/lib/async/service/supervisor/supervised.rb +8 -4
- data/lib/async/service/supervisor/version.rb +1 -1
- data/readme.md +4 -4
- data/releases.md +4 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- 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: 6a0086a1c1f5816a02f4d611debc76dbb5ca57d61add0ae50c95a5c94169b268
|
|
4
|
+
data.tar.gz: '07742320659e85f1931e75929de111362d503ec3e1f32cda7c4971d0459a95d0'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d67c02d1a93dbda316a5656f832a14337e528d9532bffe28fe78bddd6fadde1181bd7dce9c164c5c602654dd29d3826c370edfd54fe4c4a54179813cb6d35af5
|
|
7
|
+
data.tar.gz: ad9a517628238cd27c72f5bbf3fcd044eda810b39745faa7c455cfa8cc4f2af24807ad5ecb86d597cd96b0d10b92061f33c8357851b2dd608ea7facaf792f057
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
|
@@ -56,12 +56,15 @@ module Async
|
|
|
56
56
|
end
|
|
57
57
|
|
|
58
58
|
# The supervised worker for the current process.
|
|
59
|
+
# @parameter state [Hash | Nil] Additional state to register with the supervisor.
|
|
59
60
|
# @returns [Worker] The worker client.
|
|
60
|
-
def supervisor_worker
|
|
61
|
+
def supervisor_worker(state: nil)
|
|
62
|
+
state = self.supervisor_worker_state.merge(state || {})
|
|
63
|
+
|
|
61
64
|
Worker.new(
|
|
62
65
|
process_id: Process.pid,
|
|
63
66
|
endpoint: supervisor_endpoint,
|
|
64
|
-
state:
|
|
67
|
+
state: state,
|
|
65
68
|
utilization_schema: self.utilization_schema,
|
|
66
69
|
utilization_registry: self.utilization_registry,
|
|
67
70
|
)
|
|
@@ -70,11 +73,12 @@ module Async
|
|
|
70
73
|
# Create a supervised worker for the given instance.
|
|
71
74
|
#
|
|
72
75
|
# @parameter instance [Async::Container::Instance] The container instance.
|
|
76
|
+
# @parameter state [Hash | Nil] Additional state to register with the supervisor.
|
|
73
77
|
# @returns [Worker] The worker client.
|
|
74
|
-
def prepare!(instance)
|
|
78
|
+
def prepare!(instance, state: nil)
|
|
75
79
|
super(instance)
|
|
76
80
|
|
|
77
|
-
supervisor_worker.run
|
|
81
|
+
supervisor_worker(state: state).run
|
|
78
82
|
end
|
|
79
83
|
end
|
|
80
84
|
end
|
data/readme.md
CHANGED
|
@@ -28,6 +28,10 @@ Please see the [project documentation](https://socketry.github.io/async-service-
|
|
|
28
28
|
|
|
29
29
|
Please see the [project releases](https://socketry.github.io/async-service-supervisor/releases/index) for all releases.
|
|
30
30
|
|
|
31
|
+
### v0.18.0
|
|
32
|
+
|
|
33
|
+
- Allow supervised services to merge additional worker state during preparation and worker construction.
|
|
34
|
+
|
|
31
35
|
### v0.17.0
|
|
32
36
|
|
|
33
37
|
- Add opt-in `metrics` and `traces` providers for supervisor process metrics, utilization metrics, and worker lifecycle tracing.
|
|
@@ -69,10 +73,6 @@ Please see the [project releases](https://socketry.github.io/async-service-super
|
|
|
69
73
|
- Add support for `Memory::Leak::Cluster` `free_size_minimum:` option.
|
|
70
74
|
- Remove extraneous "Memory leak detected\!" logs.
|
|
71
75
|
|
|
72
|
-
### v0.9.1
|
|
73
|
-
|
|
74
|
-
- Close `Call` queue if asynchronous call fails during dispatch - further messages will fail with `ClosedQueueError`.
|
|
75
|
-
|
|
76
76
|
## Contributing
|
|
77
77
|
|
|
78
78
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Releases
|
|
2
2
|
|
|
3
|
+
## v0.18.0
|
|
4
|
+
|
|
5
|
+
- Allow supervised services to merge additional worker state during preparation and worker construction.
|
|
6
|
+
|
|
3
7
|
## v0.17.0
|
|
4
8
|
|
|
5
9
|
- Add opt-in `metrics` and `traces` providers for supervisor process metrics, utilization metrics, and worker lifecycle tracing.
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
Binary file
|