sidekiq-batching 0.0.1 → 0.0.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: 680d50e306eddc51995164a7d565e6cdc777ceea
4
- data.tar.gz: 73340f1b7215bff463cfa8f09e05fdf9de82474a
3
+ metadata.gz: f472e6f0af1c292d4a07c0a8b9641cc2b8f295d9
4
+ data.tar.gz: 1007f7871b797fec4f79069eb932b83ff38c31ec
5
5
  SHA512:
6
- metadata.gz: 60e20f03424b583ce84ce28bc5dce944cbc94495ca8ca6d6840ccfbbb2ee1ed58ad08ed4cd03e2c2f8a22d9a89ead2a4474e633744ac5a2a61d16f701971ebde
7
- data.tar.gz: 8e0038fc5d3d8ce9d512a915f71ad261aedfad579e083062597db428a947eec157e66b1250fc6644534bd387707e5e2d7a53f64d43bbb306e2a07548b254ec99
6
+ metadata.gz: 5b1af0dbf8e998efad86e2d92b9a4d3d494e24bd29c915ba53501fc1d292192b293aa438025f70a08da28d30f46db3a755ae98fd80be0db93d9756f9944e6946
7
+ data.tar.gz: dcc5340a07ff05b1c58dd24d513b2696de01f10a2bb2ce53de08a39e5fe8148e86ab287f50dfa1a5e222f5e3e38338835b398942562c38aa54e56034c88fea07
data/README.md CHANGED
@@ -16,8 +16,8 @@ class ElasticBulkIndexWorker
16
16
 
17
17
  sidekiq_options(
18
18
  queue: :batched_by_size,
19
- batch_size: 30,
20
- batch_flush_interval: 30,
19
+ batch_size: 30, # Jobs will be combined to groups of 30 items
20
+ batch_flush_interval: 60, # Combined jobs will be executed at least every 60 seconds
21
21
  retry: 5
22
22
  )
23
23
 
@@ -48,7 +48,7 @@ This jobs will be grouped into a single job which will be performed with the sin
48
48
  ]
49
49
  ```
50
50
 
51
- This will happen for every 30 jobs in a row or every 30 seconds.
51
+ This will happen for every 30 jobs in a row or every 60 seconds.
52
52
 
53
53
  Add this line to your `config/routes.rb` to activate web UI:
54
54
 
@@ -33,6 +33,7 @@ module Sidekiq
33
33
  def flush
34
34
  chunk = pluck
35
35
  if chunk
36
+ set_current_time_as_last
36
37
  Sidekiq::Client.push(
37
38
  'class' => @worker_class,
38
39
  'queue' => @queue,
@@ -1,5 +1,5 @@
1
1
  module Sidekiq
2
2
  module Batching
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sidekiq-batching
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
  - Victor Sokolov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-12 00:00:00.000000000 Z
11
+ date: 2014-04-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler