advanced-sneakers-activejob 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +15 -1
- data/README.md +15 -2
- data/lib/advanced_sneakers_activejob/configuration.rb +1 -0
- data/lib/advanced_sneakers_activejob/handler.rb +1 -7
- data/lib/advanced_sneakers_activejob/tasks.rb +1 -1
- data/lib/advanced_sneakers_activejob/version.rb +1 -1
- data/lib/advanced_sneakers_activejob.rb +6 -1
- metadata +5 -17
- data/.gitignore +0 -24
- data/.rspec +0 -2
- data/.rubocop.yml +0 -50
- data/.travis.yml +0 -25
- data/Appraisals +0 -13
- data/Gemfile +0 -7
- data/Rakefile +0 -8
- data/advanced-sneakers-activejob.gemspec +0 -38
- data/gemfiles/.bundle/config +0 -3
- data/gemfiles/activejob_4.2.x.gemfile +0 -7
- data/gemfiles/activejob_5.2.x.gemfile +0 -7
- data/gemfiles/activejob_6.0.x.gemfile +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d76d72ecda9caf10d961a1489214fb54a19b336fb2bfaa20c0db2678e06a36e0
|
4
|
+
data.tar.gz: 22ce99262256a1e7715ad56ea901163ea6a88ac66c9f6b4df0c457dc3c8633a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 682edc7c6a50785943662fd7350881df2808a942eb0101b92e4cdefcc44e37481be1b791af4ed9d7af38939e2554a748ab836ec2daa4ec936688b19201de56ef
|
7
|
+
data.tar.gz: de2fcbb80cfcb3d011334355aad8d09532d497b1151b11b2407d42435b967b5154e488f058324bcfb496e7279637c7d0c93fc16bdcc31d34c190adf6bfd07603
|
data/CHANGELOG.md
CHANGED
@@ -4,7 +4,21 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
6
6
|
|
7
|
-
## [Unreleased](https://github.com/veeqo/advanced-sneakers-activejob/compare/v0.
|
7
|
+
## [Unreleased](https://github.com/veeqo/advanced-sneakers-activejob/compare/v0.6.0...HEAD)
|
8
|
+
|
9
|
+
|
10
|
+
## [0.6.0](https://github.com/veeqo/advanced-sneakers-activejob/compare/v0.5.0...v0.6.0) - 2022-02-15
|
11
|
+
|
12
|
+
### Added
|
13
|
+
- [#24](https://github.com/veeqo/advanced-sneakers-activejob/pull/24) Test with ruby 3 and ActiveJob v6.1
|
14
|
+
- [#26](https://github.com/veeqo/advanced-sneakers-activejob/pull/26) Make log level to be configurable
|
15
|
+
- [#30](https://github.com/veeqo/advanced-sneakers-activejob/pull/30) Add support for ActiveJob v7.0
|
16
|
+
|
17
|
+
### Changed
|
18
|
+
- [#22](https://github.com/veeqo/advanced-sneakers-activejob/pull/22) Migrate from Travis to Github Actions
|
19
|
+
|
20
|
+
### Removed
|
21
|
+
- [#27](https://github.com/veeqo/advanced-sneakers-activejob/pull/27) Drop support of rubies older than 2.5
|
8
22
|
|
9
23
|
|
10
24
|
## [0.5.0](https://github.com/veeqo/advanced-sneakers-activejob/compare/v0.4.0...v0.5.0) - 2020-11-30
|
data/README.md
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
# `:advanced_sneakers` adapter for ActiveJob
|
2
|
-
[![Build Status](https://
|
2
|
+
[![Build Status](https://github.com/veeqo/advanced-sneakers-activejob/actions/workflows/main.yml/badge.svg?branch=main)](https://github.com/veeqo/advanced-sneakers-activejob/actions/workflows/main.yml) [![Gem Version](https://badge.fury.io/rb/advanced-sneakers-activejob.svg)](https://badge.fury.io/rb/advanced-sneakers-activejob)
|
3
3
|
|
4
4
|
Drop-in replacement for `:sneakers` adapter of ActiveJob. Extra features:
|
5
5
|
|
@@ -11,6 +11,12 @@ Drop-in replacement for `:sneakers` adapter of ActiveJob. Extra features:
|
|
11
11
|
6. [Exponential backoff\*](#exponential-backoff)
|
12
12
|
7. Exposes [`#delivery_info` & `#headers`](#amqp-metadata) AMQP metadata to job
|
13
13
|
|
14
|
+
<p align="center">
|
15
|
+
<a href="https://www.veeqo.com/" title="Sponsored by Veeqo">
|
16
|
+
<img src="https://static.veeqo.com/assets/sponsored_by_veeqo.png" width="360" />
|
17
|
+
</a>
|
18
|
+
</p>
|
19
|
+
|
14
20
|
## Installation
|
15
21
|
|
16
22
|
Add this line to your application's Gemfile:
|
@@ -181,6 +187,9 @@ AdvancedSneakersActiveJob.configure do |config|
|
|
181
187
|
|
182
188
|
# Connection for publisher (fallbacks to connection of consumers)
|
183
189
|
config.publish_connection = Bunny.new('CUSTOM_URL', with: { other: 'options' })
|
190
|
+
|
191
|
+
# Log level of "rake sneakers:active_job" output
|
192
|
+
config.log_level = :info
|
184
193
|
end
|
185
194
|
```
|
186
195
|
|
@@ -192,4 +201,8 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/veeqo/
|
|
192
201
|
|
193
202
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
194
203
|
|
195
|
-
##
|
204
|
+
## About [Veeqo](https://www.veeqo.com)
|
205
|
+
|
206
|
+
At Veeqo, our team of Engineers is on a mission to create a world-class Inventory and Shipping platform, built to the highest standards in best coding practices. We are a growing team, looking for other passionate developers to [join us](https://veeqo-ltd.breezy.hr/) on our journey. If you're looking for a career working for one of the most exciting tech companies in ecommerce, we want to hear from you.
|
207
|
+
|
208
|
+
[Veeqo developers blog](https://devs.veeqo.com)
|
@@ -16,6 +16,7 @@ module AdvancedSneakersActiveJob
|
|
16
16
|
config_accessor(:delay_proc) { ->(timestamp) { (timestamp - Time.now.to_f).round } } # seconds
|
17
17
|
config_accessor(:delayed_queue_prefix) { 'delayed' }
|
18
18
|
config_accessor(:retry_delay_proc) { ->(count) { AdvancedSneakersActiveJob::EXPONENTIAL_BACKOFF[count] } } # seconds
|
19
|
+
config_accessor(:log_level) { :info } # debug logs are too noizy because of Bunny
|
19
20
|
|
20
21
|
config_accessor(:publish_connection)
|
21
22
|
|
@@ -57,14 +57,8 @@ module AdvancedSneakersActiveJob
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def track_error_in_headers(headers, error)
|
60
|
-
details = if error.respond_to?(:full_message) # ruby 2.5+
|
61
|
-
error.full_message
|
62
|
-
else
|
63
|
-
([error.message] + error.backtrace).join("\n")
|
64
|
-
end
|
65
|
-
|
66
60
|
headers['x-last-error-name'] = error.class.name
|
67
|
-
headers['x-last-error-details'] = Base64.encode64(ActiveSupport::Gzip.compress(
|
61
|
+
headers['x-last-error-details'] = Base64.encode64(ActiveSupport::Gzip.compress(error.full_message))
|
68
62
|
end
|
69
63
|
|
70
64
|
def calculate_delay(headers, delivery_info)
|
@@ -16,7 +16,7 @@ namespace :sneakers do
|
|
16
16
|
|
17
17
|
Sneakers.configure(AdvancedSneakersActiveJob.config.sneakers)
|
18
18
|
|
19
|
-
Sneakers.logger.level =
|
19
|
+
Sneakers.logger.level = AdvancedSneakersActiveJob.config.log_level
|
20
20
|
|
21
21
|
Rake::Task['sneakers:run'].invoke
|
22
22
|
end
|
@@ -25,8 +25,13 @@ ActiveSupport.on_load(:active_job) do
|
|
25
25
|
ActiveJob::Base.include AdvancedSneakersActiveJob::ActiveJobPatch
|
26
26
|
end
|
27
27
|
|
28
|
+
# Enforce definition of ActionMailer consumers
|
28
29
|
ActiveSupport.on_load(:action_mailer) do
|
29
|
-
|
30
|
+
# https://github.com/rails/rails/commit/f5050d998def98563f8fa4b381c09f563681f159
|
31
|
+
require 'action_mailer/mail_delivery_job' if ActionMailer.gem_version >= Gem::Version.new('6.0.0')
|
32
|
+
|
33
|
+
# https://github.com/rails/rails/commit/ddc7fb6e6ee957aae35f1bb11d35c2d3e3b0cdda
|
34
|
+
require 'action_mailer/delivery_job' if ActionMailer.gem_version < Gem::Version.new('7.0.0')
|
30
35
|
end
|
31
36
|
|
32
37
|
# Advanced Sneakers adapter for ActiveJob
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: advanced-sneakers-activejob
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rustam Sharshenov
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activejob
|
@@ -131,21 +131,9 @@ executables: []
|
|
131
131
|
extensions: []
|
132
132
|
extra_rdoc_files: []
|
133
133
|
files:
|
134
|
-
- ".gitignore"
|
135
|
-
- ".rspec"
|
136
|
-
- ".rubocop.yml"
|
137
|
-
- ".travis.yml"
|
138
|
-
- Appraisals
|
139
134
|
- CHANGELOG.md
|
140
|
-
- Gemfile
|
141
135
|
- LICENSE.txt
|
142
136
|
- README.md
|
143
|
-
- Rakefile
|
144
|
-
- advanced-sneakers-activejob.gemspec
|
145
|
-
- gemfiles/.bundle/config
|
146
|
-
- gemfiles/activejob_4.2.x.gemfile
|
147
|
-
- gemfiles/activejob_5.2.x.gemfile
|
148
|
-
- gemfiles/activejob_6.0.x.gemfile
|
149
137
|
- lib/active_job/queue_adapters/advanced_sneakers_adapter.rb
|
150
138
|
- lib/advanced/sneakers/activejob.rb
|
151
139
|
- lib/advanced_sneakers_activejob.rb
|
@@ -168,7 +156,7 @@ licenses:
|
|
168
156
|
metadata:
|
169
157
|
homepage_uri: https://github.com/veeqo/advanced-sneakers-activejob
|
170
158
|
source_code_uri: https://github.com/veeqo/advanced-sneakers-activejob
|
171
|
-
changelog_uri: https://github.com/veeqo/advanced-sneakers-activejob/blob/
|
159
|
+
changelog_uri: https://github.com/veeqo/advanced-sneakers-activejob/blob/main/CHANGELOG.md
|
172
160
|
post_install_message:
|
173
161
|
rdoc_options: []
|
174
162
|
require_paths:
|
@@ -177,14 +165,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
177
165
|
requirements:
|
178
166
|
- - ">="
|
179
167
|
- !ruby/object:Gem::Version
|
180
|
-
version: '
|
168
|
+
version: '2.5'
|
181
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
182
170
|
requirements:
|
183
171
|
- - ">="
|
184
172
|
- !ruby/object:Gem::Version
|
185
173
|
version: '0'
|
186
174
|
requirements: []
|
187
|
-
rubygems_version: 3.
|
175
|
+
rubygems_version: 3.0.8
|
188
176
|
signing_key:
|
189
177
|
specification_version: 4
|
190
178
|
summary: Advanced Sneakers adapter for ActiveJob
|
data/.gitignore
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
/.bundle/
|
2
|
-
/.yardoc
|
3
|
-
/_yardoc/
|
4
|
-
/coverage/
|
5
|
-
/doc/
|
6
|
-
/pkg/
|
7
|
-
/spec/reports/
|
8
|
-
/tmp/
|
9
|
-
/Gemfile.lock
|
10
|
-
/gemfiles/*.lock
|
11
|
-
/.ruby-gemset
|
12
|
-
/.ruby-version
|
13
|
-
|
14
|
-
# rspec failure tracking
|
15
|
-
.rspec_status
|
16
|
-
|
17
|
-
# sneakers pid file
|
18
|
-
sneakers.pid
|
19
|
-
|
20
|
-
# log files
|
21
|
-
spec/apps/log/*
|
22
|
-
|
23
|
-
# temp files
|
24
|
-
spec/apps/tmp/*
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
@@ -1,50 +0,0 @@
|
|
1
|
-
AllCops:
|
2
|
-
NewCops: enable
|
3
|
-
Exclude:
|
4
|
-
- gemfiles/**/*
|
5
|
-
|
6
|
-
Layout/LineLength:
|
7
|
-
Max: 140
|
8
|
-
Exclude:
|
9
|
-
- spec/**/*
|
10
|
-
|
11
|
-
Lint/SuppressedException:
|
12
|
-
Exclude:
|
13
|
-
- spec/**/*
|
14
|
-
|
15
|
-
Lint/ConstantDefinitionInBlock:
|
16
|
-
Enabled: false
|
17
|
-
|
18
|
-
Gemspec/RequiredRubyVersion:
|
19
|
-
Enabled: false
|
20
|
-
|
21
|
-
Metrics/ClassLength:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
Metrics/BlockLength:
|
25
|
-
Exclude:
|
26
|
-
- advanced-sneakers-activejob.gemspec
|
27
|
-
- spec/**/*
|
28
|
-
|
29
|
-
Metrics/CyclomaticComplexity:
|
30
|
-
Exclude:
|
31
|
-
- spec/support/log_helpers.rb
|
32
|
-
|
33
|
-
Metrics/MethodLength:
|
34
|
-
Exclude:
|
35
|
-
- spec/**/*
|
36
|
-
|
37
|
-
Security/MarshalLoad:
|
38
|
-
Exclude:
|
39
|
-
- spec/**/*
|
40
|
-
|
41
|
-
Security/Eval:
|
42
|
-
Exclude:
|
43
|
-
- spec/apps/**/*
|
44
|
-
|
45
|
-
Metrics/AbcSize:
|
46
|
-
Exclude:
|
47
|
-
- spec/**/*
|
48
|
-
|
49
|
-
Style/Documentation:
|
50
|
-
Enabled: false
|
data/.travis.yml
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
---
|
2
|
-
dist: xenial
|
3
|
-
language: ruby
|
4
|
-
cache: bundler
|
5
|
-
|
6
|
-
rvm:
|
7
|
-
- 2.5.8
|
8
|
-
- 2.6.6
|
9
|
-
- 2.7.1
|
10
|
-
|
11
|
-
gemfile:
|
12
|
-
- gemfiles/activejob_4.2.x.gemfile
|
13
|
-
- gemfiles/activejob_5.2.x.gemfile
|
14
|
-
- gemfiles/activejob_6.0.x.gemfile
|
15
|
-
|
16
|
-
matrix:
|
17
|
-
exclude:
|
18
|
-
- rvm: 2.7.1
|
19
|
-
gemfile: gemfiles/activejob_4.2.x.gemfile
|
20
|
-
|
21
|
-
before_install: 'gem install bundler -v "$(ruby -e "puts RUBY_VERSION.to_f >= 2.7 ? \">= 2.0\" : \"< 2\"")"'
|
22
|
-
|
23
|
-
before_script: .ci/install_rabbitmq
|
24
|
-
|
25
|
-
bundler_args: --jobs 3 --retry 3
|
data/Appraisals
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
lib = File.expand_path('lib', __dir__)
|
4
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
|
-
require 'advanced_sneakers_activejob/version'
|
6
|
-
|
7
|
-
Gem::Specification.new do |spec|
|
8
|
-
spec.name = 'advanced-sneakers-activejob'
|
9
|
-
spec.version = AdvancedSneakersActiveJob::VERSION
|
10
|
-
spec.authors = ['Rustam Sharshenov', 'Vlad Bokov']
|
11
|
-
spec.email = ['rustam@sharshenov.com', 'vlad@lunatic.cat']
|
12
|
-
|
13
|
-
spec.summary = 'Advanced Sneakers adapter for ActiveJob'
|
14
|
-
spec.description = 'Advanced Sneakers adapter for ActiveJob'
|
15
|
-
spec.homepage = 'https://github.com/veeqo/advanced-sneakers-activejob'
|
16
|
-
spec.license = 'MIT'
|
17
|
-
|
18
|
-
if spec.respond_to?(:metadata)
|
19
|
-
spec.metadata['homepage_uri'] = spec.homepage
|
20
|
-
spec.metadata['source_code_uri'] = spec.homepage
|
21
|
-
spec.metadata['changelog_uri'] = 'https://github.com/veeqo/advanced-sneakers-activejob/blob/master/CHANGELOG.md'
|
22
|
-
end
|
23
|
-
|
24
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
25
|
-
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec|\.ci)/}) }
|
26
|
-
end
|
27
|
-
spec.require_paths = ['lib']
|
28
|
-
|
29
|
-
spec.add_dependency 'activejob', '>= 4.2'
|
30
|
-
spec.add_dependency 'bunny-publisher', '~> 0.2.0'
|
31
|
-
spec.add_dependency 'sneakers', '~> 2.7'
|
32
|
-
|
33
|
-
spec.add_development_dependency 'appraisal', '~> 2.3.0'
|
34
|
-
spec.add_development_dependency 'bundler'
|
35
|
-
spec.add_development_dependency 'pry-byebug'
|
36
|
-
spec.add_development_dependency 'rabbitmq_http_api_client', '~> 1.13'
|
37
|
-
spec.add_development_dependency 'rspec', '~> 3.0'
|
38
|
-
end
|
data/gemfiles/.bundle/config
DELETED