backfiller 0.2.0 → 0.2.1

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: 18b60be56e9153bca870e126330f666518c012c885c2e3d86d5c24625b395780
4
- data.tar.gz: 06e10fa60228916766f7740231add1e1acc0c3f7dec1b9a1055785d908941a29
3
+ metadata.gz: 3a2970d20d09fbc21cb45a2e81bcad1df89c5eb7bbc18bc3efb4e5aca9ca0a6e
4
+ data.tar.gz: 5b77098aa1904af855f50b577f4a30fb5daa8fe49af2bccaec95465175aaa37d
5
5
  SHA512:
6
- metadata.gz: 0315e6720c7ec5c15904696843caef797a5beceb2771934b01dcc61fddbbb4f65c28fb9b4a60ad94ea2c1d31161facc64f5016a8a236f506ea02f560b94e9262
7
- data.tar.gz: 5a085ff3f03022926e6e188f1900f3697658ca78489e45273fce7fc6d6a78e93708c481c7bcfd09ddf049fe223c04f8ac6f625d7dc0fa103282070b1297d23f0
6
+ metadata.gz: fd118a4e985e3baabcebe0701e1dfc65e7843e218fc5c92ddda693be6df385b7192b8bb45073b292847e2108a6670c1604cac8ea434698c16b44286b67b06f90
7
+ data.tar.gz: 137858d879d1f470b60848bd6190aa273bf323640a5c06f2a827f0a4e7d18998f0b9c5133e4379056583c636643c87f4801f71b6449fa241de6aa7352044bfe3
data/Changelog.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.2.1
4
+
5
+ * `cursor_threshold` is nil by default.
6
+
3
7
  ## 0.2.0
4
8
 
5
9
  * Upgrade local gems
data/README.md CHANGED
@@ -168,6 +168,7 @@ For Rails application backfiller is initialized with next options
168
168
  * task_directory: `RAILS_ROOT/db/backfill`
169
169
  * task_namespace: `Backfill`
170
170
  * batch_size: `1_000`
171
+ * cursor_threshold: `nil`
171
172
  * connection_pool: `ApplicationRecord.connection_pool`
172
173
  * logger: `ApplicationRecord.logger`
173
174
 
@@ -186,6 +187,10 @@ class Backfill::Foo
186
187
  def batch_size
187
188
  100
188
189
  end
190
+
191
+ def cursor_threshold
192
+ 100_000
193
+ end
189
194
  end
190
195
  ```
191
196
 
data/backfiller.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = 'backfiller'
8
- spec.version = '0.2.0'
8
+ spec.version = '0.2.1'
9
9
  spec.authors = ['Andriy Yanko']
10
10
  spec.email = ['andriy.yanko@railsware.com']
11
11
 
@@ -14,8 +14,6 @@ module Backfiller
14
14
 
15
15
  config.batch_size = 1_000
16
16
 
17
- config.cursor_threshold = 100_000
18
-
19
17
  config.logger = defined?(ApplicationRecord) ? ApplicationRecord.logger : ActiveRecord::Base.logger
20
18
  end
21
19
  end
@@ -114,7 +114,7 @@ module Backfiller
114
114
 
115
115
  Backfiller.log "Processed #{count}"
116
116
 
117
- return [false, count] if count > cursor_threshold
117
+ return [false, count] if cursor_threshold && count > cursor_threshold
118
118
  end
119
119
  end
120
120
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: backfiller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andriy Yanko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-07-05 00:00:00.000000000 Z
11
+ date: 2021-07-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord