resque-roulette 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 05cc1d80c24b00965ae14a24f8b78e73ea9008e6826026405be6cd163818b537
4
- data.tar.gz: 81caf598215dedef4040e3a2defe01c43b4a90dd905c75bbad90a46cc8c1a50d
3
+ metadata.gz: 0b31b767a11732dd11f0eeb044f8d1ad5be28120066bf9347e6feb85bb48054d
4
+ data.tar.gz: f8103a79ec6b33fdc8967d30d173a78880d113ecc41d3e961ad8cfe0728f7ca5
5
5
  SHA512:
6
- metadata.gz: '0319ef58c6365f05fe8658e3879bb31d56140ee96b8ef259a7f29b9068623b8781bf2f134c52a5a519042e1958fd9d14f118b653e1dcea706795d655037fc339'
7
- data.tar.gz: 3398fb601d49ec79ae2e34dd5eff07d5c7c4b9d5cbbce5e9ef7f5692746b5e8198ca9a725715cad5ca2e6b0a4ad0e934f502e333ce86fcb2fec41b64b4fc2312
6
+ metadata.gz: 214fe6a2773d242cb90467ae78bb7cb9f0f6a5b611fcb5b9f86ef9e6c148c904f9a1a0c1a1ce0a77b6085739914105d711273d437009d2036278c9d1df551925
7
+ data.tar.gz: ffa1a4e357f64d87884cae11a96ccad002a8c03241b86e4b54466af9a0a3ff79767af139fe08924a03696f7cb2049457ff31d7cb9029b4601fcafa3dd1348c34
data/README.md CHANGED
@@ -14,6 +14,13 @@ so on). This plugin randomizes the order of the queues based on weights, so that
14
14
  weights 4, 3, 2, 1, repsectively, A will be first 40% of the time, B 30%, C 20%, and D 10%. In addition, when B is first, A will be second 4/7ths of the time (4 / [4+2+1]), and so on. The
15
15
  project is inspired by [resque-fairly](https://github.com/pezra/resque-fairly) by Peter Williams, which unfortunately mathematically does not give you this control over the weights.
16
16
 
17
+ ### Install
18
+
19
+ ```rb
20
+ # gem 'resque'
21
+ gem 'resque-roulette'
22
+ ```
23
+
17
24
  ### Example usage
18
25
 
19
26
  ``` ruby
@@ -28,8 +35,13 @@ Resque::Plugins::Roulette.prioritize('someotherqueue', 6)
28
35
  Now, workers processing all three queues will (assuming all queues have jobs) take jobs from someotherqueue 60% of the time, myotherqueue 30% of the time, and myqueue 10% of the time. This is achieved
29
36
  by reordering the queues, so if someotherqueue is empty, the workers will take jobs from myotherqueue 75% (3/4) of the time.
30
37
 
38
+ ### Publish
39
+
40
+ - `rake build`
41
+ - `rake release`
42
+ - `gem push pkg/resque-roulette-<version>.gem`
31
43
 
32
44
  ### Authors
33
45
 
34
- - **Mantainer** - Bruno Casali @brunoocasali
35
- - **Creator** - Evan Battaglia @evanbattaglia
46
+ - **Mantainer** - Bruno Casali [@brunoocasali](https://github.com/brunoocasali)
47
+ - **Creator** - Evan Battaglia [@evanbattaglia](https://github.com/evanbattaglia)
@@ -1,7 +1,7 @@
1
1
  module Resque
2
2
  module Plugins
3
3
  module Roulette
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
6
6
  end
7
7
  end
@@ -32,8 +32,8 @@ module Resque::Plugins
32
32
 
33
33
  def self.included(klass)
34
34
  klass.instance_eval do
35
- alias queues_orig_ordered queues
36
- alias queues queues_randomly_ordered
35
+ alias_method :queues_orig_ordered, :queues
36
+ alias_method :queues, :queues_randomly_ordered
37
37
  end
38
38
  end
39
39
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: resque-roulette
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Battaglia