sqewer 8.1.0 → 9.0.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
- data/.github/workflows/main.yml +3 -5
- data/CHANGELOG.md +4 -0
- data/README.md +1 -2
- data/gemfiles/{Gemfile.rails-5.1.x → Gemfile.rails-6.1.x} +2 -2
- data/gemfiles/{Gemfile.rails-6.0.x → Gemfile.rails-7.0.x} +2 -2
- data/lib/sqewer/extensions/active_job_adapter.rb +6 -30
- data/lib/sqewer/version.rb +1 -1
- data/sqewer.gemspec +1 -1
- metadata +9 -10
- data/gemfiles/Gemfile.rails-5.0.x +0 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a77289a915370519a947d35eca6c37eaca54fd319a1bb47cf9ab6889d509a3d0
|
4
|
+
data.tar.gz: dfb8c88266e50af819c66c93c56fffebb14f675f6e6f8ec4c8869f1e2a7a6edb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 89cf6418255c49a5ddb83d27bcf8e8bca8c017dc15cad9e6fd77a41cb44b795400f474667b72bc3c6849792dabbd6742be07bc90c4fa441659166749a8b55fbd
|
7
|
+
data.tar.gz: 71e0f5ee37e30ee4729179da5c29eb231c527b9f7e7415ae11ae2109e6ac2ef7e6ecaeebf38c14f1de70a9fb9892570c1f6abb531fcf340fe74a1ea079dce698
|
data/.github/workflows/main.yml
CHANGED
@@ -9,14 +9,12 @@ jobs:
|
|
9
9
|
strategy:
|
10
10
|
matrix:
|
11
11
|
ruby:
|
12
|
+
- 3.2
|
12
13
|
- 3.1
|
13
14
|
- 3.0
|
14
|
-
- 2.7
|
15
|
-
- 2.6
|
16
15
|
gemfile:
|
17
|
-
- gemfiles/Gemfile.rails-
|
18
|
-
- gemfiles/Gemfile.rails-
|
19
|
-
- gemfiles/Gemfile.rails-6.0.x
|
16
|
+
- gemfiles/Gemfile.rails-6.1.x
|
17
|
+
- gemfiles/Gemfile.rails-7.0.x
|
20
18
|
env:
|
21
19
|
SQS_QUEUE_URL: 'sqlite3://tmp/sqewer.sqlite3'
|
22
20
|
AWS_REGION: 'eu-central-1'
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -48,7 +48,7 @@ The messages will only be deleted from SQS once the job execution completes with
|
|
48
48
|
|
49
49
|
## Requirements
|
50
50
|
|
51
|
-
Ruby
|
51
|
+
Ruby 3+, version 2 of the AWS SDK. You can also run Sqewer backed by a SQLite database file, which can be handy for development situations.
|
52
52
|
|
53
53
|
## Job storage
|
54
54
|
|
@@ -415,4 +415,3 @@ the Ruby standard library alone.
|
|
415
415
|
## Copyright
|
416
416
|
|
417
417
|
Copyright (c) 2016 WeTransfer. See LICENSE.txt for further details.
|
418
|
-
|
@@ -1,14 +1,6 @@
|
|
1
1
|
# ActiveJob docs: http://edgeguides.rubyonrails.org/active_job_basics.html
|
2
2
|
# Example adapters ref: https://github.com/rails/rails/tree/master/activejob/lib/active_job/queue_adapters
|
3
3
|
module ActiveJob
|
4
|
-
# Only prepend the module with keyword argument acceptance when the version is 4
|
5
|
-
# ActiveJob 5.x supports kwargs out of the box
|
6
|
-
if ActiveJob::VERSION::MAJOR <= 4
|
7
|
-
module Execution
|
8
|
-
prepend PerformWithKeywords
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
4
|
module QueueAdapters
|
13
5
|
# Handle Rails ActiveJob through sqewer.
|
14
6
|
# Set it up like so:
|
@@ -56,48 +48,32 @@ module ActiveJob
|
|
56
48
|
Base.execute(job)
|
57
49
|
end
|
58
50
|
end
|
59
|
-
|
51
|
+
|
60
52
|
private
|
61
|
-
|
53
|
+
|
62
54
|
def with_active_record_connection_from_pool
|
63
55
|
ActiveRecord::Base.connection_pool.with_connection { yield }
|
64
56
|
end
|
65
|
-
|
57
|
+
|
66
58
|
def active_record_defined_and_connected?
|
67
59
|
defined?(ActiveRecord) && ActiveRecord::Base.connected?
|
68
60
|
end
|
69
|
-
|
61
|
+
|
70
62
|
end
|
71
63
|
|
72
|
-
def
|
64
|
+
def enqueue(*args)
|
73
65
|
wrapped_job = Performable.from_active_job(active_job)
|
74
66
|
|
75
67
|
Sqewer.submit!(wrapped_job)
|
76
68
|
end
|
77
69
|
|
78
|
-
def
|
70
|
+
def enqueue_at(*args)
|
79
71
|
wrapped_job = Performable.from_active_job(active_job)
|
80
72
|
|
81
73
|
delta_t = (timestamp - Time.now.to_i).to_i
|
82
74
|
|
83
75
|
Sqewer.submit!(wrapped_job, delay_seconds: delta_t)
|
84
76
|
end
|
85
|
-
|
86
|
-
# ActiveJob in Rails 4 resolves the symbol value you give it
|
87
|
-
# and then tries to call enqueue_* methods directly on what
|
88
|
-
# got resolved. In Rails 5, first Rails will call .new on
|
89
|
-
# what it resolved from the symbol and _then_ call enqueue
|
90
|
-
# and enqueue_at on that what has gotten resolved. This means
|
91
|
-
# that we have to expose these methods _both_ as class methods
|
92
|
-
# and as instance methods.
|
93
|
-
# This can be removed when we stop supporting Rails 4.
|
94
|
-
def enqueue_at(*args)
|
95
|
-
self.class.enqueue_at(*args)
|
96
|
-
end
|
97
|
-
|
98
|
-
def enqueue(*args)
|
99
|
-
self.class.enqueue(*args)
|
100
|
-
end
|
101
77
|
end
|
102
78
|
end
|
103
79
|
end
|
data/lib/sqewer/version.rb
CHANGED
data/sqewer.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
|
|
12
12
|
spec.summary = %q{Process jobs from SQS}
|
13
13
|
spec.description = %q{A full-featured library for all them SQS worker needs}
|
14
14
|
spec.homepage = "https://github.com/WeTransfer/sqewer"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">=
|
15
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 3.0.0")
|
16
16
|
|
17
17
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the "allowed_push_host"
|
18
18
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sqewer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 9.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Julik Tarkhanov
|
8
8
|
- Andrei Horak
|
9
|
-
autorequire:
|
9
|
+
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-09-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-sdk-sqs
|
@@ -260,9 +260,8 @@ files:
|
|
260
260
|
- bin/sqewer
|
261
261
|
- bin/sqewer_rails
|
262
262
|
- example.env
|
263
|
-
- gemfiles/Gemfile.rails-
|
264
|
-
- gemfiles/Gemfile.rails-
|
265
|
-
- gemfiles/Gemfile.rails-6.0.x
|
263
|
+
- gemfiles/Gemfile.rails-6.1.x
|
264
|
+
- gemfiles/Gemfile.rails-7.0.x
|
266
265
|
- lib/sqewer.rb
|
267
266
|
- lib/sqewer/atomic_counter.rb
|
268
267
|
- lib/sqewer/cli.rb
|
@@ -288,7 +287,7 @@ homepage: https://github.com/WeTransfer/sqewer
|
|
288
287
|
licenses: []
|
289
288
|
metadata:
|
290
289
|
allowed_push_host: https://rubygems.org
|
291
|
-
post_install_message:
|
290
|
+
post_install_message:
|
292
291
|
rdoc_options: []
|
293
292
|
require_paths:
|
294
293
|
- lib
|
@@ -296,15 +295,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
296
295
|
requirements:
|
297
296
|
- - ">="
|
298
297
|
- !ruby/object:Gem::Version
|
299
|
-
version:
|
298
|
+
version: 3.0.0
|
300
299
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
301
300
|
requirements:
|
302
301
|
- - ">="
|
303
302
|
- !ruby/object:Gem::Version
|
304
303
|
version: '0'
|
305
304
|
requirements: []
|
306
|
-
rubygems_version: 3.
|
307
|
-
signing_key:
|
305
|
+
rubygems_version: 3.4.10
|
306
|
+
signing_key:
|
308
307
|
specification_version: 4
|
309
308
|
summary: Process jobs from SQS
|
310
309
|
test_files: []
|