aws-activejob-sqs 0.1.0 → 0.1.2
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
- data/CHANGELOG.md +12 -0
- data/VERSION +1 -1
- data/bin/aws_active_job_sqs +9 -0
- data/bin/aws_sqs_active_job +2 -0
- data/lib/aws/active_job/sqs/executor.rb +21 -0
- data/lib/aws-activejob-sqs.rb +4 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: affc2da5d1e7982fa347d088e7a9e26f657da450be383543f6f9368e915640b1
|
4
|
+
data.tar.gz: 5552185182c07bf3f121673bc3608ca3f4a023f769f0cf2a8c3d7f3248df653b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bf5bcb68796d6c1f3ecbeaea4fcc2b04e11aa8806a77e1a5c0e430b5d60cbb207d6130e9b8a8fa5ec3a3dcf412eb3df0610e238e6fb7a51644e44de90f5edc2c
|
7
|
+
data.tar.gz: 54d480693b52d54eb14d1708676e9fd726ffd74c3e2e8b9b587424b5bdb3a27156f9bb9c2fccfa7dc0b24411d2ee9637128ebdd893c35ecd1443472cf1854de7
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
Unreleased Changes
|
2
|
+
------------------
|
3
|
+
|
4
|
+
0.1.1 (2024-12-02)
|
5
|
+
------------------
|
6
|
+
* Issue - Add `aws_sqs_active_job` executable to facilitate migration to 1.0.
|
7
|
+
|
8
|
+
0.1.1 (2024-12-23)
|
9
|
+
------------------
|
10
|
+
|
11
|
+
* Feature - Add lifecycle hooks for Executor.
|
12
|
+
|
1
13
|
0.1.0 (2024-11-16)
|
2
14
|
------------------
|
3
15
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.2
|
data/bin/aws_sqs_active_job
CHANGED
@@ -15,6 +15,20 @@ module Aws
|
|
15
15
|
fallback_policy: :abort # Concurrent::RejectedExecutionError must be handled
|
16
16
|
}.freeze
|
17
17
|
|
18
|
+
class << self
|
19
|
+
def on_stop(&block)
|
20
|
+
lifecycle_hooks[:stop] << block
|
21
|
+
end
|
22
|
+
|
23
|
+
def lifecycle_hooks
|
24
|
+
@lifecycle_hooks ||= Hash.new { |h, k| h[k] = [] }
|
25
|
+
end
|
26
|
+
|
27
|
+
def clear_hooks
|
28
|
+
@lifecycle_hooks = nil
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
18
32
|
def initialize(options = {})
|
19
33
|
@executor = Concurrent::ThreadPoolExecutor.new(DEFAULTS.merge(options))
|
20
34
|
@retry_standard_errors = options[:retry_standard_errors]
|
@@ -32,6 +46,7 @@ module Aws
|
|
32
46
|
end
|
33
47
|
|
34
48
|
def shutdown(timeout = nil)
|
49
|
+
run_hooks_for(:stop)
|
35
50
|
@executor.shutdown
|
36
51
|
clean_shutdown = @executor.wait_for_termination(timeout)
|
37
52
|
if clean_shutdown
|
@@ -71,6 +86,12 @@ module Aws
|
|
71
86
|
@task_complete.set
|
72
87
|
end
|
73
88
|
end
|
89
|
+
|
90
|
+
def run_hooks_for(event_name)
|
91
|
+
return unless (hooks = self.class.lifecycle_hooks[event_name])
|
92
|
+
|
93
|
+
hooks.each(&:call)
|
94
|
+
end
|
74
95
|
end
|
75
96
|
end
|
76
97
|
end
|
data/lib/aws-activejob-sqs.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aws-activejob-sqs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Amazon Web Services
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-12-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: aws-sdk-sqs
|
@@ -63,12 +63,14 @@ email:
|
|
63
63
|
- aws-dr-rubygems@amazon.com
|
64
64
|
executables:
|
65
65
|
- aws_sqs_active_job
|
66
|
+
- aws_active_job_sqs
|
66
67
|
extensions: []
|
67
68
|
extra_rdoc_files: []
|
68
69
|
files:
|
69
70
|
- CHANGELOG.md
|
70
71
|
- LICENSE
|
71
72
|
- VERSION
|
73
|
+
- bin/aws_active_job_sqs
|
72
74
|
- bin/aws_sqs_active_job
|
73
75
|
- lib/active_job/queue_adapters/sqs_adapter.rb
|
74
76
|
- lib/active_job/queue_adapters/sqs_adapter/params.rb
|
@@ -99,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
101
|
- !ruby/object:Gem::Version
|
100
102
|
version: '0'
|
101
103
|
requirements: []
|
102
|
-
rubygems_version: 3.5.
|
104
|
+
rubygems_version: 3.5.9
|
103
105
|
signing_key:
|
104
106
|
specification_version: 4
|
105
107
|
summary: ActiveJob integration with SQS
|