async-job-adapter-active_job 0.15.0 → 0.16.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/job/adapter/active_job/dispatcher.rb +10 -0
- data/lib/async/job/adapter/active_job/environment.rb +9 -0
- data/lib/async/job/adapter/active_job/railtie.rb +1 -1
- data/lib/async/job/adapter/active_job/service.rb +13 -0
- data/lib/async/job/adapter/active_job/version.rb +1 -1
- data/readme.md +5 -5
- data/releases.md +5 -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: f9028d5ddf718de2229cf9ee46890e5a457b13a6d8dbaa25f2c900f6a54d50e3
|
4
|
+
data.tar.gz: 9cb4bbfc5097aa6a9df7380e07355dc718dd1861c34471ae97dc90267801cf1f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1b1a5ffb596faa0b7e0d503375d8df9831d83b992f0dd0c0b1d2b79e6dcba2268be29d365c2ae665656abdadb1b33af5c160a045f94850f96e7af07224c9057
|
7
|
+
data.tar.gz: 7acc485f3da39145c55d6aa15f49392ad24dddace96c2218d4fe96b6dacbe25827c0a9e67bd67c2294fdfe387c832809988e58eaad9ce8415c8effdf803c239a
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -61,6 +61,16 @@ module Async
|
|
61
61
|
@definitions.keys
|
62
62
|
end
|
63
63
|
|
64
|
+
def status_string
|
65
|
+
@queues.map do |name, queue|
|
66
|
+
if queue.respond_to?(:status_string)
|
67
|
+
"#{name} (#{queue.status_string})"
|
68
|
+
else
|
69
|
+
name
|
70
|
+
end
|
71
|
+
end.join(", ")
|
72
|
+
end
|
73
|
+
|
64
74
|
private def build(definition)
|
65
75
|
builder = Builder.new(Executor::DEFAULT)
|
66
76
|
|
@@ -17,6 +17,9 @@ module Async
|
|
17
17
|
class Service < Async::Service::Generic
|
18
18
|
# Load the Rails environment and start the job server.
|
19
19
|
def setup(container)
|
20
|
+
container_options = @evaluator.container_options
|
21
|
+
health_check_timeout = container_options[:health_check_timeout]
|
22
|
+
|
20
23
|
container.run(name: self.name, restart: true) do |instance|
|
21
24
|
evaluator = @environment.evaluator
|
22
25
|
|
@@ -26,6 +29,16 @@ module Async
|
|
26
29
|
|
27
30
|
instance.ready!
|
28
31
|
|
32
|
+
if health_check_timeout
|
33
|
+
Async(transient: true) do
|
34
|
+
while true
|
35
|
+
instance.name = "#{self.name} (#{dispatcher.status_string})"
|
36
|
+
sleep(health_check_timeout / 2)
|
37
|
+
instance.ready!
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
29
42
|
Sync do |task|
|
30
43
|
barrier = Async::Barrier.new
|
31
44
|
|
data/readme.md
CHANGED
@@ -14,6 +14,11 @@ Please see the [project documentation](https://socketry.github.io/async-job-adap
|
|
14
14
|
|
15
15
|
Please see the [project releases](https://socketry.github.io/async-job-adapter-active_job/releases/index) for all releases.
|
16
16
|
|
17
|
+
### v0.16.0
|
18
|
+
|
19
|
+
- Add container options for controlling number of workers and health check timeout.
|
20
|
+
- Add `status_string` method to `Dispatcher` for better process titles.
|
21
|
+
|
17
22
|
### v0.15.0
|
18
23
|
|
19
24
|
- Fix handling of scheduled jobs with proper `scheduled_at` assignment.
|
@@ -59,11 +64,6 @@ Please see the [project releases](https://socketry.github.io/async-job-adapter-a
|
|
59
64
|
|
60
65
|
- Update interface to suit upstream async-job changes.
|
61
66
|
|
62
|
-
### v0.8.0
|
63
|
-
|
64
|
-
- Add `#start`/`#stop` delegators for better lifecycle management.
|
65
|
-
- Performance improvements with benchmarking.
|
66
|
-
|
67
67
|
## Contributing
|
68
68
|
|
69
69
|
We welcome contributions to this project.
|
data/releases.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Releases
|
2
2
|
|
3
|
+
## v0.16.0
|
4
|
+
|
5
|
+
- Add container options for controlling number of workers and health check timeout.
|
6
|
+
- Add `status_string` method to `Dispatcher` for better process titles.
|
7
|
+
|
3
8
|
## v0.15.0
|
4
9
|
|
5
10
|
- Fix handling of scheduled jobs with proper `scheduled_at` assignment.
|
data.tar.gz.sig
CHANGED
Binary file
|
metadata
CHANGED
metadata.gz.sig
CHANGED
@@ -1,2 +1,3 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
K���g�!,4î�C�Y/�J*� e��'�*b%燫kz�D�/�Ι����t�ư�c��:�-��;�Z}~�
|
2
|
+
�j"��ѱ��3���߽��_�Vu��ߘyH����c"��l5T
|
3
|
+
���Ĺ�U�P{b@;��P_�Q���h(���E�X�6oDO����y~��u�����H%�!�� �V���w�~���Iϸ^v��M��O�YS�^_��<�c'8��,0<�����_rǭ`P�W�:c�1=��Xk�;X� B�\WyIA��L���� i�NJ��G9�𡜇À`�K6�:0�*������S�n_�n4��Q��Y]��Z�] q6�
|