sidekiq-unique-jobs 2.1.0 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of sidekiq-unique-jobs might be problematic. Click here for more details.

data/.gitignore CHANGED
@@ -1,2 +1,6 @@
1
1
 
2
2
  *.gem
3
+
4
+ .DS_Store
5
+
6
+ Gemfile.lock
data/.travis.yml ADDED
@@ -0,0 +1,15 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - jruby-19mode
5
+ branches:
6
+ only:
7
+ - master
8
+ # notifications:
9
+ # irc: "irc.freenode.org#sidekiq"
10
+ # email:
11
+ # recipients:
12
+ # - sidekiq@librelist.org
13
+ matrix:
14
+ allow_failures:
15
+ - rvm: jruby-19mode
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # SidekiqUniqueJobs
1
+ # SidekiqUniqueJobs [![Build Status](https://secure.travis-ci.org/form26/sidekiq-unique-jobs.png)](http://travis-ci.org/form26/sidekiq-unique-jobs)
2
2
 
3
3
  The missing unique jobs for sidekiq
4
4
 
@@ -7,12 +7,17 @@ module SidekiqUniqueJobs
7
7
  HASH_KEY_EXPIRATION = 30 * 60
8
8
 
9
9
  def call(worker_class, item, queue)
10
+
10
11
  enabled = worker_class.get_sidekiq_options['unique']
12
+
11
13
  if enabled
12
- payload_hash = Digest::MD5.hexdigest(Sidekiq.dump_json(item))
14
+
15
+ payload_hash = Digest::MD5.hexdigest(Sidekiq.dump_json(item['args']))
16
+
13
17
  unique = false
14
18
 
15
19
  Sidekiq.redis do |conn|
20
+
16
21
  conn.watch(payload_hash)
17
22
 
18
23
  if conn.get(payload_hash)
@@ -1,3 +1,3 @@
1
1
  module SidekiqUniqueJobs
2
- VERSION = "2.1.0"
2
+ VERSION = "2.2.0"
3
3
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "sidekiq-unique-jobs"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = SidekiqUniqueJobs::VERSION
17
- gem.add_dependency 'sidekiq', '~> 2.1.0'
17
+ gem.add_dependency 'sidekiq', '~> 2.2.0'
18
18
  gem.add_development_dependency 'minitest', '~> 3'
19
19
  gem.add_development_dependency 'sinatra'
20
20
  gem.add_development_dependency 'slim'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-unique-jobs
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.2.0
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: 2012-08-07 00:00:00.000000000 Z
12
+ date: 2012-08-19 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sidekiq
@@ -18,7 +18,7 @@ dependencies:
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 2.1.0
21
+ version: 2.2.0
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
@@ -26,7 +26,7 @@ dependencies:
26
26
  requirements:
27
27
  - - ~>
28
28
  - !ruby/object:Gem::Version
29
- version: 2.1.0
29
+ version: 2.2.0
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: minitest
32
32
  requirement: !ruby/object:Gem::Requirement
@@ -131,9 +131,9 @@ extensions: []
131
131
  extra_rdoc_files: []
132
132
  files:
133
133
  - .gitignore
134
+ - .travis.yml
134
135
  - CHANGELOG.md
135
136
  - Gemfile
136
- - Gemfile.lock
137
137
  - LICENSE
138
138
  - README.md
139
139
  - Rakefile
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  segments:
162
162
  - 0
163
- hash: -2446112843822293648
163
+ hash: 901520156680191383
164
164
  required_rubygems_version: !ruby/object:Gem::Requirement
165
165
  none: false
166
166
  requirements:
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  segments:
171
171
  - 0
172
- hash: -2446112843822293648
172
+ hash: 901520156680191383
173
173
  requirements: []
174
174
  rubyforge_project:
175
175
  rubygems_version: 1.8.24
data/Gemfile.lock DELETED
@@ -1,133 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- sidekiq-unique-jobs (2.1.0)
5
- sidekiq (~> 2.1.0)
6
-
7
- GEM
8
- remote: http://rubygems.org/
9
- specs:
10
- actionmailer (3.2.6)
11
- actionpack (= 3.2.6)
12
- mail (~> 2.4.4)
13
- actionpack (3.2.6)
14
- activemodel (= 3.2.6)
15
- activesupport (= 3.2.6)
16
- builder (~> 3.0.0)
17
- erubis (~> 2.7.0)
18
- journey (~> 1.0.1)
19
- rack (~> 1.4.0)
20
- rack-cache (~> 1.2)
21
- rack-test (~> 0.6.1)
22
- sprockets (~> 2.1.3)
23
- activemodel (3.2.6)
24
- activesupport (= 3.2.6)
25
- builder (~> 3.0.0)
26
- activerecord (3.2.6)
27
- activemodel (= 3.2.6)
28
- activesupport (= 3.2.6)
29
- arel (~> 3.0.2)
30
- tzinfo (~> 0.3.29)
31
- activeresource (3.2.6)
32
- activemodel (= 3.2.6)
33
- activesupport (= 3.2.6)
34
- activesupport (3.2.6)
35
- i18n (~> 0.6)
36
- multi_json (~> 1.0)
37
- arel (3.0.2)
38
- builder (3.0.0)
39
- celluloid (0.11.1)
40
- timers (>= 1.0.0)
41
- connection_pool (0.9.2)
42
- erubis (2.7.0)
43
- hike (1.2.1)
44
- i18n (0.6.0)
45
- journey (1.0.4)
46
- json (1.7.3)
47
- mail (2.4.4)
48
- i18n (>= 0.4.0)
49
- mime-types (~> 1.16)
50
- treetop (~> 1.4.8)
51
- mime-types (1.19)
52
- minitest (3.2.0)
53
- multi_json (1.3.6)
54
- polyglot (0.3.3)
55
- rack (1.4.1)
56
- rack-cache (1.2)
57
- rack (>= 0.4)
58
- rack-protection (1.2.0)
59
- rack
60
- rack-ssl (1.3.2)
61
- rack
62
- rack-test (0.6.1)
63
- rack (>= 1.0)
64
- rails (3.2.6)
65
- actionmailer (= 3.2.6)
66
- actionpack (= 3.2.6)
67
- activerecord (= 3.2.6)
68
- activeresource (= 3.2.6)
69
- activesupport (= 3.2.6)
70
- bundler (~> 1.0)
71
- railties (= 3.2.6)
72
- railties (3.2.6)
73
- actionpack (= 3.2.6)
74
- activesupport (= 3.2.6)
75
- rack-ssl (~> 1.3.2)
76
- rake (>= 0.8.7)
77
- rdoc (~> 3.4)
78
- thor (>= 0.14.6, < 2.0)
79
- rake (0.9.2.2)
80
- rdoc (3.12)
81
- json (~> 1.4)
82
- redis (3.0.1)
83
- redis-namespace (1.2.0)
84
- redis (~> 3.0.0)
85
- sass (3.1.20)
86
- sidekiq (2.1.0)
87
- celluloid (~> 0.11.1)
88
- connection_pool (~> 0.9.2)
89
- multi_json (~> 1)
90
- redis (~> 3)
91
- redis-namespace
92
- simplecov (0.6.4)
93
- multi_json (~> 1.0)
94
- simplecov-html (~> 0.5.3)
95
- simplecov-html (0.5.3)
96
- sinatra (1.3.2)
97
- rack (~> 1.3, >= 1.3.6)
98
- rack-protection (~> 1.2)
99
- tilt (~> 1.3, >= 1.3.3)
100
- slim (1.2.2)
101
- temple (~> 0.4.0)
102
- tilt (~> 1.3.3)
103
- sprockets (2.1.3)
104
- hike (~> 1.2)
105
- rack (~> 1.0)
106
- tilt (~> 1.1, != 1.3.0)
107
- sqlite3 (1.3.6)
108
- temple (0.4.0)
109
- thor (0.15.4)
110
- tilt (1.3.3)
111
- timers (1.0.1)
112
- treetop (1.4.10)
113
- polyglot
114
- polyglot (>= 0.3.1)
115
- tzinfo (0.3.33)
116
-
117
- PLATFORMS
118
- ruby
119
-
120
- DEPENDENCIES
121
- actionmailer (~> 3)
122
- activerecord (~> 3)
123
- celluloid
124
- minitest (~> 3)
125
- rails (= 3.2.6)
126
- rake
127
- sass
128
- sidekiq-unique-jobs!
129
- simplecov
130
- sinatra
131
- slim
132
- sprockets
133
- sqlite3