aws-activejob-sqs 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d11b67b0f50d2a026a3c64f8289d98c8b8a6cd37e5a670346807a29061f183a0
4
- data.tar.gz: 503d0cbb51a915877b89dcbcf23a97a62fbf50599daddb56120e010dc4e8b612
3
+ metadata.gz: 82c2370fcb69f9135107d5c01bacabba872af1e234f8202397137f2197207ed8
4
+ data.tar.gz: 04de9ca10586e5f33a457736721ee60650cf3457c386839af832fc40281be692
5
5
  SHA512:
6
- metadata.gz: 69a4e6b7028efff40930d0f2d2ee76131878399b92d9ea1543a7461c624ef7b2d83d43a8243877a41321af428e3e65ec9e448cfeea0f378903609704110f9f59
7
- data.tar.gz: 3375ea92eb2f0923eca14e90a326210c027bde82879933fa6fd4bbd54270aeb1519188fcf85a11d28b41731b7090f79d82796b543dfe6b208ecbb8dd4956d492
6
+ metadata.gz: e95f977177dee9d4037a775c7381c8967ef31de003eaf6fb88a5fc2f3bc0fc269fe73a4352a8f83b96570c1ef9d0439de6a55580c2c467405e40fa6f71547716
7
+ data.tar.gz: d1fc77c9673fee409fbb0c5cc0a946adc9200fe2581e72e07d9bf279302326bc2470582e46ef4b2e310b18d41148e02452fc869781f7391ca75c5548f0d17d10
data/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 1.0.1 (2024-12-23)
2
+ ------------------
3
+
4
+ * Issue - Add deprecated `aws_sqs_active_job` executable to aid in migration.
5
+ * Issue - Support legacy `queue: 'url'` config in file to aid in migration.
6
+
1
7
  1.0.0 (2024-12-13)
2
8
  ------------------
3
9
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.0.1
@@ -0,0 +1,18 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require_relative '../lib/aws-activejob-sqs'
5
+ require_relative '../lib/aws/active_job/sqs/cli_options'
6
+ require_relative '../lib/aws/active_job/sqs/poller'
7
+
8
+ opts = Aws::ActiveJob::SQS::CliOptions.parse(ARGV)
9
+
10
+ if opts[:boot_rails]
11
+ require 'rails'
12
+ require File.expand_path('config/environment.rb')
13
+ end
14
+
15
+ require File.join(Dir.pwd, opts[:require]) if opts[:require]
16
+
17
+ puts 'WARNING: Using deprecated poller executable. Please migrate to `aws_active_job_sqs`'
18
+ Aws::ActiveJob::SQS::Poller.new(opts.to_h.compact).run
@@ -275,7 +275,11 @@ module Aws
275
275
  # Load options from YAML file
276
276
  def load_from_file(file_path)
277
277
  opts = load_yaml(file_path) || {}
278
- opts.deep_symbolize_keys
278
+ opts = opts.deep_symbolize_keys
279
+ opts[:queues]&.each_key do |queue|
280
+ opts[:queues][queue] = { url: opts[:queues][queue] } if opts[:queues][queue].is_a?(String)
281
+ end
282
+ opts
279
283
  end
280
284
 
281
285
  def load_yaml(file_path)
@@ -100,6 +100,7 @@ module Aws
100
100
  end
101
101
 
102
102
  def validate_config(queue)
103
+ puts Aws::ActiveJob::SQS.config.queues
103
104
  return if Aws::ActiveJob::SQS.config.queues[queue]&.fetch(:url, nil)
104
105
 
105
106
  raise ArgumentError, "No URL configured for queue #{queue}"
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: 1.0.0
4
+ version: 1.0.1
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-12-13 00:00:00.000000000 Z
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,6 +63,7 @@ email:
63
63
  - aws-dr-rubygems@amazon.com
64
64
  executables:
65
65
  - aws_active_job_sqs
66
+ - aws_sqs_active_job
66
67
  extensions: []
67
68
  extra_rdoc_files: []
68
69
  files:
@@ -70,6 +71,7 @@ files:
70
71
  - LICENSE
71
72
  - VERSION
72
73
  - bin/aws_active_job_sqs
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
75
77
  - lib/active_job/queue_adapters/sqs_async_adapter.rb