sidekiq 0.8.0 → 0.9.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 might be problematic. Click here for more details.

Files changed (66) hide show
  1. data/Changes.md +11 -0
  2. data/Gemfile +7 -1
  3. data/LICENSE +7 -1
  4. data/README.md +2 -0
  5. data/TODO.md +1 -2
  6. data/bin/sidekiq +1 -1
  7. data/config.ru +8 -0
  8. data/examples/config.yml +0 -2
  9. data/examples/scheduling.rb +37 -0
  10. data/lib/sidekiq.rb +25 -11
  11. data/lib/sidekiq/capistrano.rb +8 -5
  12. data/lib/sidekiq/cli.rb +20 -21
  13. data/lib/sidekiq/client.rb +9 -6
  14. data/lib/sidekiq/extensions/action_mailer.rb +1 -2
  15. data/lib/sidekiq/extensions/active_record.rb +1 -3
  16. data/lib/sidekiq/extensions/generic_proxy.rb +1 -1
  17. data/lib/sidekiq/manager.rb +28 -22
  18. data/lib/sidekiq/middleware/client/unique_jobs.rb +3 -3
  19. data/lib/sidekiq/middleware/server/failure_jobs.rb +1 -1
  20. data/lib/sidekiq/middleware/server/unique_jobs.rb +1 -1
  21. data/lib/sidekiq/processor.rb +4 -6
  22. data/lib/sidekiq/rails.rb +16 -1
  23. data/lib/sidekiq/redis_connection.rb +3 -3
  24. data/lib/sidekiq/util.rb +3 -15
  25. data/lib/sidekiq/version.rb +1 -1
  26. data/lib/sidekiq/web.rb +93 -0
  27. data/lib/sidekiq/worker.rb +0 -4
  28. data/myapp/Gemfile +15 -3
  29. data/myapp/app/controllers/work_controller.rb +1 -1
  30. data/myapp/config/initializers/sidekiq.rb +2 -2
  31. data/myapp/config/routes.rb +2 -2
  32. data/sidekiq.gemspec +3 -1
  33. data/test/helper.rb +4 -0
  34. data/test/test_cli.rb +26 -14
  35. data/test/test_client.rb +2 -2
  36. data/test/test_extensions.rb +11 -7
  37. data/test/test_manager.rb +2 -3
  38. data/test/test_middleware.rb +1 -1
  39. data/test/test_stats.rb +28 -29
  40. data/test/test_testing.rb +47 -14
  41. data/test/test_web.rb +51 -0
  42. data/web/assets/images/bootstrap/glyphicons-halflings-white.png +0 -0
  43. data/web/assets/images/bootstrap/glyphicons-halflings.png +0 -0
  44. data/web/assets/javascripts/application.js +3 -0
  45. data/web/assets/javascripts/vendor/bootstrap.js +12 -0
  46. data/web/assets/javascripts/vendor/bootstrap/bootstrap-alert.js +91 -0
  47. data/web/assets/javascripts/vendor/bootstrap/bootstrap-button.js +98 -0
  48. data/web/assets/javascripts/vendor/bootstrap/bootstrap-carousel.js +154 -0
  49. data/web/assets/javascripts/vendor/bootstrap/bootstrap-collapse.js +136 -0
  50. data/web/assets/javascripts/vendor/bootstrap/bootstrap-dropdown.js +92 -0
  51. data/web/assets/javascripts/vendor/bootstrap/bootstrap-modal.js +210 -0
  52. data/web/assets/javascripts/vendor/bootstrap/bootstrap-popover.js +95 -0
  53. data/web/assets/javascripts/vendor/bootstrap/bootstrap-scrollspy.js +125 -0
  54. data/web/assets/javascripts/vendor/bootstrap/bootstrap-tab.js +130 -0
  55. data/web/assets/javascripts/vendor/bootstrap/bootstrap-tooltip.js +270 -0
  56. data/web/assets/javascripts/vendor/bootstrap/bootstrap-transition.js +51 -0
  57. data/web/assets/javascripts/vendor/bootstrap/bootstrap-typeahead.js +271 -0
  58. data/web/assets/javascripts/vendor/jquery.js +9266 -0
  59. data/web/assets/stylesheets/application.css +11 -0
  60. data/web/assets/stylesheets/vendor/bootstrap-responsive.css +567 -0
  61. data/web/assets/stylesheets/vendor/bootstrap.css +3365 -0
  62. data/web/views/index.slim +42 -0
  63. data/web/views/layout.slim +24 -0
  64. data/web/views/queue.slim +11 -0
  65. metadata +71 -22
  66. data/lib/sidekiq/middleware/client/resque_web_compatibility.rb +0 -14
@@ -0,0 +1,42 @@
1
+
2
+ .hero-unit
3
+ h1 Sidekiq is #{status}
4
+ p Processed: #{processed}
5
+ p Failed: #{failed}
6
+ p Workers: #{workers.size}
7
+
8
+ .tabbable
9
+ ul.nav.nav-tabs
10
+ li.active
11
+ a href="#workers" data-toggle="tab" Workers
12
+ li
13
+ a href="#queues" data-toggle="tab" Queues
14
+ .tab-content
15
+ #workers.tab-pane.active
16
+ table class="table table-striped table-bordered"
17
+ tr
18
+ th Worker
19
+ th Queue
20
+ th Class
21
+ th Arguments
22
+ - workers.each do |(worker, msg)|
23
+ tr
24
+ td= worker
25
+ - if msg
26
+ td= msg['queue']
27
+ td= msg['payload']['class']
28
+ td= msg['payload']['args'].inspect[0..100]
29
+ - else
30
+ td colspan=3 Idle
31
+
32
+ #queues.tab-pane
33
+ table class="table table-striped table-bordered"
34
+ tr
35
+ th Queue
36
+ th Size
37
+ - queues.each do |(queue, size)|
38
+ tr
39
+ td
40
+ a href="queues/#{queue}" #{queue}
41
+ td= size
42
+
@@ -0,0 +1,24 @@
1
+ doctype html
2
+ html
3
+ head
4
+ link href='#{{root_path}}assets/application.css' media='screen' rel='stylesheet' type='text/css'
5
+ title Sidekiq
6
+ body
7
+ .navbar.navbar-fixed-top
8
+ .navbar-inner
9
+ .container
10
+ a.brand href='#{{root_path}}'
11
+ | Sidekiq
12
+ ul.nav
13
+ li
14
+ a href='#{{root_path}}' Home
15
+ ul.nav.pull-right
16
+ li
17
+ a Redis: #{location}
18
+ li
19
+ a #{Time.now.utc}
20
+
21
+ .container
22
+ == yield
23
+
24
+ script type="text/javascript" src="#{{root_path}}assets/application.js"
@@ -0,0 +1,11 @@
1
+ header
2
+ h1 Latest messages in #{@name}
3
+
4
+ table class="table table-striped table-bordered"
5
+ tr
6
+ th Class
7
+ th Arguments
8
+ - @messages.each do |msg|
9
+ tr
10
+ td= msg['class']
11
+ td= msg['args'].inspect[0..100]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-02 00:00:00.000000000 Z
12
+ date: 2012-03-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: redis
16
- requirement: &70185139523000 !ruby/object:Gem::Requirement
16
+ requirement: &70241342627260 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70185139523000
24
+ version_requirements: *70241342627260
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: redis-namespace
27
- requirement: &70185139512240 !ruby/object:Gem::Requirement
27
+ requirement: &70241342626820 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,21 +32,21 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70185139512240
35
+ version_requirements: *70241342626820
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: connection_pool
38
- requirement: &70185139511020 !ruby/object:Gem::Requirement
38
+ requirement: &70241342626320 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
42
42
  - !ruby/object:Gem::Version
43
- version: '0'
43
+ version: 0.9.0
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70185139511020
46
+ version_requirements: *70241342626320
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: celluloid
49
- requirement: &70185139509380 !ruby/object:Gem::Requirement
49
+ requirement: &70241342625900 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70185139509380
57
+ version_requirements: *70241342625900
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: multi_json
60
- requirement: &70185139508520 !ruby/object:Gem::Requirement
60
+ requirement: &70241342625440 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,32 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70185139508520
68
+ version_requirements: *70241342625440
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: minitest
71
- requirement: &70185139506420 !ruby/object:Gem::Requirement
71
+ requirement: &70241342625020 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - ! '>='
75
+ - !ruby/object:Gem::Version
76
+ version: '0'
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70241342625020
80
+ - !ruby/object:Gem::Dependency
81
+ name: sinatra
82
+ requirement: &70241342624600 !ruby/object:Gem::Requirement
83
+ none: false
84
+ requirements:
85
+ - - ! '>='
86
+ - !ruby/object:Gem::Version
87
+ version: '0'
88
+ type: :development
89
+ prerelease: false
90
+ version_requirements: *70241342624600
91
+ - !ruby/object:Gem::Dependency
92
+ name: slim
93
+ requirement: &70241342624180 !ruby/object:Gem::Requirement
72
94
  none: false
73
95
  requirements:
74
96
  - - ! '>='
@@ -76,10 +98,10 @@ dependencies:
76
98
  version: '0'
77
99
  type: :development
78
100
  prerelease: false
79
- version_requirements: *70185139506420
101
+ version_requirements: *70241342624180
80
102
  - !ruby/object:Gem::Dependency
81
103
  name: rake
82
- requirement: &70185139505520 !ruby/object:Gem::Requirement
104
+ requirement: &70241342623760 !ruby/object:Gem::Requirement
83
105
  none: false
84
106
  requirements:
85
107
  - - ! '>='
@@ -87,10 +109,10 @@ dependencies:
87
109
  version: '0'
88
110
  type: :development
89
111
  prerelease: false
90
- version_requirements: *70185139505520
112
+ version_requirements: *70241342623760
91
113
  - !ruby/object:Gem::Dependency
92
114
  name: actionmailer
93
- requirement: &70185139503040 !ruby/object:Gem::Requirement
115
+ requirement: &70241342623340 !ruby/object:Gem::Requirement
94
116
  none: false
95
117
  requirements:
96
118
  - - ! '>='
@@ -98,10 +120,10 @@ dependencies:
98
120
  version: '0'
99
121
  type: :development
100
122
  prerelease: false
101
- version_requirements: *70185139503040
123
+ version_requirements: *70241342623340
102
124
  - !ruby/object:Gem::Dependency
103
125
  name: activerecord
104
- requirement: &70185139500600 !ruby/object:Gem::Requirement
126
+ requirement: &70241342622920 !ruby/object:Gem::Requirement
105
127
  none: false
106
128
  requirements:
107
129
  - - ! '>='
@@ -109,7 +131,7 @@ dependencies:
109
131
  version: '0'
110
132
  type: :development
111
133
  prerelease: false
112
- version_requirements: *70185139500600
134
+ version_requirements: *70241342622920
113
135
  description: Simple, efficient message processing for Ruby
114
136
  email:
115
137
  - mperham@gmail.com
@@ -129,6 +151,7 @@ files:
129
151
  - TODO.md
130
152
  - bin/client
131
153
  - bin/sidekiq
154
+ - config.ru
132
155
  - examples/chef/cookbooks/sidekiq/README.rdoc
133
156
  - examples/chef/cookbooks/sidekiq/recipes/default.rb
134
157
  - examples/chef/cookbooks/sidekiq/templates/default/monitrc.conf.erb
@@ -137,6 +160,7 @@ files:
137
160
  - examples/config.yml
138
161
  - examples/monitrc.conf
139
162
  - examples/por.rb
163
+ - examples/scheduling.rb
140
164
  - examples/sinkiq.rb
141
165
  - lib/sidekiq.rb
142
166
  - lib/sidekiq/capistrano.rb
@@ -147,7 +171,6 @@ files:
147
171
  - lib/sidekiq/extensions/generic_proxy.rb
148
172
  - lib/sidekiq/manager.rb
149
173
  - lib/sidekiq/middleware/chain.rb
150
- - lib/sidekiq/middleware/client/resque_web_compatibility.rb
151
174
  - lib/sidekiq/middleware/client/unique_jobs.rb
152
175
  - lib/sidekiq/middleware/server/active_record.rb
153
176
  - lib/sidekiq/middleware/server/exception_handler.rb
@@ -160,6 +183,7 @@ files:
160
183
  - lib/sidekiq/testing.rb
161
184
  - lib/sidekiq/util.rb
162
185
  - lib/sidekiq/version.rb
186
+ - lib/sidekiq/web.rb
163
187
  - lib/sidekiq/worker.rb
164
188
  - myapp/.gitignore
165
189
  - myapp/Capfile
@@ -213,6 +237,30 @@ files:
213
237
  - test/test_processor.rb
214
238
  - test/test_stats.rb
215
239
  - test/test_testing.rb
240
+ - test/test_web.rb
241
+ - web/assets/images/bootstrap/glyphicons-halflings-white.png
242
+ - web/assets/images/bootstrap/glyphicons-halflings.png
243
+ - web/assets/javascripts/application.js
244
+ - web/assets/javascripts/vendor/bootstrap.js
245
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-alert.js
246
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-button.js
247
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-carousel.js
248
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-collapse.js
249
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-dropdown.js
250
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-modal.js
251
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-popover.js
252
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-scrollspy.js
253
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-tab.js
254
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-tooltip.js
255
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-transition.js
256
+ - web/assets/javascripts/vendor/bootstrap/bootstrap-typeahead.js
257
+ - web/assets/javascripts/vendor/jquery.js
258
+ - web/assets/stylesheets/application.css
259
+ - web/assets/stylesheets/vendor/bootstrap-responsive.css
260
+ - web/assets/stylesheets/vendor/bootstrap.css
261
+ - web/views/index.slim
262
+ - web/views/layout.slim
263
+ - web/views/queue.slim
216
264
  homepage: http://mperham.github.com/sidekiq
217
265
  licenses: []
218
266
  post_install_message:
@@ -249,4 +297,5 @@ test_files:
249
297
  - test/test_processor.rb
250
298
  - test/test_stats.rb
251
299
  - test/test_testing.rb
300
+ - test/test_web.rb
252
301
  has_rdoc:
@@ -1,14 +0,0 @@
1
- module Sidekiq
2
- module Middleware
3
- module Client
4
- class ResqueWebCompatibility
5
-
6
- def call(item, queue)
7
- Sidekiq.redis.sadd('queues', queue)
8
- yield
9
- end
10
-
11
- end
12
- end
13
- end
14
- end