sidekiq-superworker 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/sidekiq/client_ext.rb +13 -9
- data/lib/sidekiq/superworker/version.rb +1 -1
- metadata +2 -2
data/lib/sidekiq/client_ext.rb
CHANGED
@@ -1,13 +1,17 @@
|
|
1
|
-
#
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
# We need to be able to inject the jid for a job when we call Sidekiq::Client#push.
|
2
|
+
# Sidekiq didn't support this prior to 2.12.2, so we need to add support for it to
|
3
|
+
# those versions.
|
4
|
+
if Gem::Version.new(Sidekiq::VERSION) < Gem::Version.new('2.12.2')
|
5
|
+
module Sidekiq
|
6
|
+
class Client
|
7
|
+
class << self
|
8
|
+
alias_method :original_normalize_item, :normalize_item
|
6
9
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
10
|
+
def normalize_item(item)
|
11
|
+
normalized_item = original_normalize_item(item)
|
12
|
+
normalized_item['jid'] = item['jid'] if item['jid'].present?
|
13
|
+
normalized_item
|
14
|
+
end
|
11
15
|
end
|
12
16
|
end
|
13
17
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sidekiq-superworker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sidekiq
|