README.md in sidekiq-limit_fetch-1.0 vs README.md in sidekiq-limit_fetch-1.1
- old
+ new
@@ -18,10 +18,12 @@
gem 'sidekiq-limit_fetch'
## Usage
+### Limits
+
Specify limits which you want to place on queues inside sidekiq.yml:
```yaml
:limits:
queue_name1: 5
@@ -40,10 +42,12 @@
Ability to set limits dynamically allows you to resize worker
distribution among queues any time you want.
+### Pauses
+
You can also pause your queues temporarely. Upon continuing their limits
will be preserved.
```ruby
Sidekiq::Queue['name'].pause # prevents workers from running tasks from this queue
@@ -56,10 +60,11 @@
```ruby
Sidekiq::Queue['name'].busy # number of busy workers
```
+### Multiple processes
Limits are applied per process. In case you have several worker
processes and want to have global locks between them, you'll need to
enable global mode by setting global option, eg:
@@ -72,10 +77,12 @@
```ruby
Sidekiq.options[:global] = true
```
+### Blocking queue mode
+
If you use strict queue ordering (it will be used if you don't specify queue weights)
then you can set blocking status for queues. It means if a blocking
queue task is executing then no new task from lesser priority queues will
be ran. Eg,
@@ -97,8 +104,10 @@
Sidekiq::Queue['name'].block
Sidekiq::Queue['name'].blocking? # => true
Sidekiq::Queue['name'].unblock
```
+
+### Thanks
Sponsored by [Evil Martians].
[Evil Martians]: http://evilmartians.com/