sidekiq-transaction_guard 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 +4 -4
- data/CHANGELOG.md +4 -0
- data/VERSION +1 -1
- data/lib/sidekiq/transaction_guard/middleware.rb +4 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e27eee15051c5f07cf60ef45c168acc319c41883a7b67f398b7699555d7eebad
|
4
|
+
data.tar.gz: 4c7468a9c73455fe68eec99c6b0e756f510a8d8d2f83983523a9cb3871ead584
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 23aae8c43a758882aa38de9c7cce90c709ecca1784e7c56c78e223db406d7bec88fba99fa5794226fe8a94d6a23f764b11b2e3ed42f6017847bddefa42350ecc
|
7
|
+
data.tar.gz: 668a578d96d136cd382a400efbf46f6f94715c53917e017c6833a5f5cf362e24254f1fa2444350a09509201785b9d62adef9008d238bbe0c40aec9ed144bb1c7
|
data/CHANGELOG.md
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.0.
|
1
|
+
1.0.1
|
@@ -12,8 +12,10 @@ module Sidekiq
|
|
12
12
|
class Middleware
|
13
13
|
def call(worker_class, job, queue, redis_pool)
|
14
14
|
# Check if we need to log this. Also, convert worker_class to its actual class
|
15
|
-
|
16
|
-
|
15
|
+
if in_transaction?
|
16
|
+
worker_class = worker_class.constantize if worker_class.is_a?(String)
|
17
|
+
log_transaction(worker_class, job)
|
18
|
+
end
|
17
19
|
yield
|
18
20
|
end
|
19
21
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-transaction_guard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brian Durand
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2020-01-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activerecord
|
@@ -160,8 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
- !ruby/object:Gem::Version
|
161
161
|
version: '0'
|
162
162
|
requirements: []
|
163
|
-
|
164
|
-
rubygems_version: 2.7.6
|
163
|
+
rubygems_version: 3.0.3
|
165
164
|
signing_key:
|
166
165
|
specification_version: 4
|
167
166
|
summary: Protect from accidentally invoking Sidekiq jobs when there are open database
|