async-service-supervisor 0.11.0 → 0.11.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/context/migration.md +7 -6
- data/lib/async/service/supervisor/supervisor_controller.rb +1 -0
- data/lib/async/service/supervisor/version.rb +1 -1
- data/lib/async/service/supervisor/worker_controller.rb +1 -0
- data.tar.gz.sig +0 -0
- metadata +1 -1
- metadata.gz.sig +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8ae8e8b4a4a8853a5c4c7ff0044a8be8bf6a1da1a9929acd09ddb9284b77b083
|
|
4
|
+
data.tar.gz: 261ccf70f647cf5676494fc77a952eea875ba342428284df2d56abf4ec1922f9
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 5ed659e705698067c9d1d59e1a61674bc82586445c6bf9ace4a932c5e9e79fcb426204f527a2670fffe9e0532adb80e99f20427eb8ab3325ede2a20d4ff4c735
|
|
7
|
+
data.tar.gz: 12fba3a0e3c4fdbe2379ea8aacd89e271488ac8c8f99e2920b6c63e867e98f4e0552b55442785cb70a21ceee34be9048bf9c2651aab41a8950bdc3b6df5fb9c8
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/context/migration.md
CHANGED
|
@@ -61,15 +61,15 @@ Replace all references to `Async::Container::Supervisor` with `Async::Service::S
|
|
|
61
61
|
include Async::Container::Supervisor::Environment
|
|
62
62
|
include Async::Container::Supervisor::Supervised
|
|
63
63
|
|
|
64
|
-
Async::Container::Supervisor::MemoryMonitor.new
|
|
65
|
-
Async::Container::Supervisor::ProcessMonitor.new
|
|
64
|
+
Async::Container::Supervisor::MemoryMonitor.new
|
|
65
|
+
Async::Container::Supervisor::ProcessMonitor.new
|
|
66
66
|
|
|
67
67
|
# After:
|
|
68
68
|
include Async::Service::Supervisor::Environment
|
|
69
69
|
include Async::Service::Supervisor::Supervised
|
|
70
70
|
|
|
71
|
-
Async::Service::Supervisor::MemoryMonitor.new
|
|
72
|
-
Async::Service::Supervisor::ProcessMonitor.new
|
|
71
|
+
Async::Service::Supervisor::MemoryMonitor.new
|
|
72
|
+
Async::Service::Supervisor::ProcessMonitor.new
|
|
73
73
|
```
|
|
74
74
|
|
|
75
75
|
### 4. Update Worker Service Setup
|
|
@@ -237,7 +237,7 @@ client.connect do |connection|
|
|
|
237
237
|
# Direct call-based API:
|
|
238
238
|
result = connection.call(do: :restart)
|
|
239
239
|
result = connection.call(do: :status)
|
|
240
|
-
result = connection.call(do: :forward, operation: {
|
|
240
|
+
result = connection.call(do: :forward, operation: {do: :whatever}, connection_id: "...")
|
|
241
241
|
end
|
|
242
242
|
```
|
|
243
243
|
|
|
@@ -253,7 +253,8 @@ client.connect do |connection|
|
|
|
253
253
|
|
|
254
254
|
# Worker operations use the worker controller:
|
|
255
255
|
worker = connection[:worker]
|
|
256
|
-
# Worker operations are available through the worker controller
|
|
256
|
+
# Worker operations are available through the worker controller:
|
|
257
|
+
worker.whatever
|
|
257
258
|
end
|
|
258
259
|
```
|
|
259
260
|
|
|
@@ -12,6 +12,7 @@ module Async
|
|
|
12
12
|
#
|
|
13
13
|
# Handles registration of workers, worker lookup, restarting process groups, and status queries.
|
|
14
14
|
class SupervisorController < Async::Bus::Controller
|
|
15
|
+
# Initialize the supervisor controller with the server and connection.
|
|
15
16
|
def initialize(server, connection)
|
|
16
17
|
@server = server
|
|
17
18
|
@connection = connection
|
|
@@ -13,6 +13,7 @@ module Async
|
|
|
13
13
|
#
|
|
14
14
|
# Handles diagnostic operations like memory dumps, thread dumps, scheduler dumps, etc.
|
|
15
15
|
class WorkerController < Async::Bus::Controller
|
|
16
|
+
# Initialize the worker controller for the worker.
|
|
16
17
|
def initialize(worker)
|
|
17
18
|
@worker = worker
|
|
18
19
|
end
|
data.tar.gz.sig
CHANGED
|
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
�
|
|
2
|
-
|
|
1
|
+
kv~�w�ί�=�궨���x����~ h�C���" �g�Mo�31ڤ��,q��;�f��l~&ԓx�uL6�ˋ�ElP�Q��;���z.Y�]� ϯ* �`b�^�Xjg�#�ƎQ\��$86J=�&�PK&�H�;m8�&�y��Q)+U�[�=C���M����F��ʾ?B��N�5�Z�Ij�'q�tC���4����~"�{ |�49��e�&4�ej�7���
|
|
2
|
+
������c$��<N���<�M�1Ƶ��`��c���섶�OH|��OL��g�6�:�����I3L�N_���
|
|
3
|
+
���~��$W��7do�8��g!Ƕ����|���!ݧ~�y�G�2{/U�8�|���N�kq�=D]�
|