sidekiq-job-manager 0.1.0 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 33349e621f83f560be352fce901cadcab2899217
4
- data.tar.gz: 37a8d1a936172860dcf4ceef293d6885d37857f6
3
+ metadata.gz: b98d1b7322f1ded43d63e141042ad54f1f956565
4
+ data.tar.gz: 4c88770fbbd5f2ed9cd4d581b1295d7939b11bb7
5
5
  SHA512:
6
- metadata.gz: d95b1cadc97b81b499f0d033da06e3f128277ebee7e639d438f477e36536507431646e38484c8c84c57ff3b97ff9e018ac48a7a1b6eb04f74d04fd77f05ac2fd
7
- data.tar.gz: 74d819970b40058087d54ce05a73c6d6e56b27ee154513867a5f95600a438946d77db4561744b1d9cf14f53d54682bb2910797f9069751a528a46efbe133f036
6
+ metadata.gz: 4eca5c63c54ed8a9a432b5de16ca4a8d6a3fdfbfad614fc8d1ee4a5b12195b07a16d8047718b183e61976397a455c2d2a9a25ac4515f5bd0e515e8b5788b4aca
7
+ data.tar.gz: 3a916ecc134d4b560442a812cc5bd454f0ecafa4cc6faa48faa585edb07368427ba679e88d1aabf31b95749cd257f9648b7ad1416d42a4ac3035333155cf8d41
data/LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright (c) 2012 Marcelo Silveira
1
+ Copyright (c) 2013 Leonid Bugaev
2
2
 
3
3
  MIT License
4
4
 
data/README.md CHANGED
@@ -1,132 +0,0 @@
1
- # Sidekiq::Failures [![Build Status](https://secure.travis-ci.org/mhfs/sidekiq-failures.png)](http://travis-ci.org/mhfs/sidekiq-failures)
2
-
3
- Keeps track of Sidekiq failed jobs and adds a tab to the Web UI to let you browse
4
- them. Makes use of Sidekiq's custom tabs and middleware chain.
5
-
6
- It mimics the way Resque keeps track of failures.
7
-
8
- WARNING: by default sidekiq-failures will keep up to 1000 failures. See [Maximum Tracked Failures](https://github.com/mhfs/sidekiq-failures#maximum-tracked-failures) below.
9
-
10
- ## Installation
11
-
12
- Add this line to your application's Gemfile:
13
-
14
- ```ruby
15
- gem 'sidekiq-failures'
16
- ```
17
-
18
- ## Usage
19
-
20
- Simply having the gem in your Gemfile is enough to get you started. Your failed
21
- jobs will be visible via a Failures tab in the Web UI.
22
-
23
- ## Configuring
24
-
25
- ### Maximum Tracked Failures
26
-
27
- Since each failed job/retry creates a new failure entry that will only be removed
28
- by you manually, your failures list might consume more resources than you have
29
- available.
30
-
31
- To avoid this sidekiq-failures adopts a default of 1000 maximum tracked failures.
32
-
33
- To change the maximum amount:
34
-
35
- ```ruby
36
- Sidekiq.configure_server do |config|
37
- config.failures_max_count = 5000
38
- end
39
- ```
40
-
41
- To disable the limit entirely:
42
-
43
- ```ruby
44
- Sidekiq.configure_server do |config|
45
- config.failures_max_count = false
46
- end
47
- ```
48
-
49
- ### Failures Tracking Mode
50
-
51
- Sidekiq-failures offers three failures tracking options (per worker):
52
-
53
-
54
- #### :all (default)
55
-
56
- Tracks failures every time a background job fails. This mean a job with 25 retries
57
- enabled might generate up to 25 failure entries. If the worker has retry disabled
58
- only one failure will be tracked.
59
-
60
- This is the default behavior but can be made explicit with:
61
-
62
- ```ruby
63
- class MyWorker
64
- include Sidekiq::Worker
65
-
66
- sidekiq_options :failures => true # or :all
67
-
68
- def perform; end
69
- end
70
- ```
71
-
72
- #### :exhausted
73
-
74
- Only track failures if the job exhausts all its retries (or doesn't have retries
75
- enabled).
76
-
77
- You can set this mode as follows:
78
-
79
- ```ruby
80
- class MyWorker
81
- include Sidekiq::Worker
82
-
83
- sidekiq_options :failures => :exhausted
84
-
85
- def perform; end
86
- end
87
- ```
88
-
89
- #### :off
90
-
91
- You can also completely turn off failures tracking for a given worker as follows:
92
-
93
- ```ruby
94
- class MyWorker
95
- include Sidekiq::Worker
96
-
97
- sidekiq_options :failures => false # or :off
98
-
99
- def perform; end
100
- end
101
- ```
102
-
103
- #### Change the default mode
104
-
105
- You can also change the default of all your workers at once by setting the following
106
- server config:
107
-
108
- ```ruby
109
- Sidekiq.configure_server do |config|
110
- config.failures_default_mode = :off
111
- end
112
- ```
113
-
114
- The valid modes are `:all`, `:exhausted` or `:off`.
115
-
116
- ## Dependencies
117
-
118
- Depends on Sidekiq >= 2.9.0
119
-
120
- ## Contributing
121
-
122
- 1. Fork it
123
- 2. Create your feature branch (`git checkout -b my-new-feature`)
124
- 3. Commit your changes (`git commit -am 'Added some feature'`)
125
- 4. Push to the branch (`git push origin my-new-feature`)
126
- 5. Create new Pull Request
127
-
128
- ## License
129
-
130
- Released under the MIT License. See the [LICENSE][license] file for further details.
131
-
132
- [license]: https://github.com/mhfs/sidekiq-failures/blob/master/LICENSE
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module JobManager
3
- VERSION = "0.1.0"
3
+ VERSION = "0.1.2"
4
4
  end
5
5
  end
@@ -10,27 +10,6 @@ require "sidekiq/job-manager/web_extension"
10
10
 
11
11
  module Sidekiq
12
12
 
13
- SIDEKIQ_FAILURES_MODES = [:all, :exhausted, :off].freeze
14
-
15
- # Sets the default failure tracking mode.
16
- #
17
- # The value provided here will be the default behavior but can be overwritten
18
- # per worker by using `sidekiq_options :failures => :mode`
19
- #
20
- # Defaults to :all
21
- def self.failures_default_mode=(mode)
22
- unless SIDEKIQ_FAILURES_MODES.include?(mode.to_sym)
23
- raise ArgumentError, "Sidekiq#failures_default_mode valid options: #{SIDEKIQ_FAILURES_MODES}"
24
- end
25
-
26
- @failures_default_mode = mode.to_sym
27
- end
28
-
29
- # Fetches the default failure tracking mode.
30
- def self.failures_default_mode
31
- @failures_default_mode || :all
32
- end
33
-
34
13
  # Sets the maximum number of failures to track
35
14
  #
36
15
  # If the number of failures exceeds this number the list will be trimmed (oldest
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-job-manager
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Leonid Bugaev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-16 00:00:00.000000000 Z
11
+ date: 2013-08-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sidekiq
@@ -110,7 +110,7 @@ files:
110
110
  - README.md
111
111
  - Rakefile
112
112
  - config.ru
113
- - lib/sidekiq-manager.rb
113
+ - lib/sidekiq-job-manager.rb
114
114
  - lib/sidekiq/job-manager.rb
115
115
  - lib/sidekiq/job-manager/middleware.rb
116
116
  - lib/sidekiq/job-manager/version.rb