lhm-shopify 3.4.1 → 3.4.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
  SHA256:
3
- metadata.gz: ef0c285f7d63755816429aa2795220be251c0c93c4506f8255f7e547c074d574
4
- data.tar.gz: 5de29d0b924375634c061a459837f0ea6a12d5ccf58226032ef25f708ef15628
3
+ metadata.gz: cfb1802db81b2673ea5e52acec84b4e457a8d5debb74f5391fcb282bf1fc8484
4
+ data.tar.gz: 88abd0ae0484efa69777b0284c253788996b2148c0cb61fc035c0ccd7d49627c
5
5
  SHA512:
6
- metadata.gz: 2d24b1d78c6fdd67129ee91a01d043ccefb1f2e8c4b8322553f1c6cbfed6237105e58eb6ddab0e143869b813682ea6b3c25e5a40e66199f76adc0cc99a97050b
7
- data.tar.gz: 327b3a438ac2fb1b0763396094baed303a2ecb9a37558295b8b516b089bcca73534102351281883679263f7e69647d1129941df4970d3abae004faf93d91db62
6
+ metadata.gz: 4b98a803678e1ab543997d4e6f9031b02511324293c2d97b3f94938ae6b701e55c122633ab6044920363c56d9746e35f9b131433eb65108437c4ffeb8ca2e5ea
7
+ data.tar.gz: '018c3a179dfdf90f9b5fd4bd3f67636644fc47eda7b0b825aee00330db0f83a59cf6855a5e18105493a89ac0a372ac26fd2c356148282449ca2de84fc56c5179'
data/lib/lhm/chunker.rb CHANGED
@@ -38,7 +38,7 @@ module Lhm
38
38
 
39
39
  def execute
40
40
  @start_time = Time.now
41
-
41
+
42
42
  return if @chunk_finder.table_empty?
43
43
  @next_to_insert = @start
44
44
  while @next_to_insert <= @limit || (@start == @limit)
@@ -49,7 +49,12 @@ module Lhm
49
49
  affected_rows = ChunkInsert.new(@migration, @connection, bottom, top, @options).insert_and_return_count_of_rows_created
50
50
  expected_rows = top - bottom + 1
51
51
 
52
- rate_limited_log_progress
52
+ # Only log the chunker progress every 5 minutes instead of every iteration
53
+ current_time = Time.now
54
+ if current_time - @start_time > (5 * 60)
55
+ Lhm.logger.info("Inserted #{affected_rows} rows into the destination table from #{bottom} to #{top}")
56
+ @start_time = current_time
57
+ end
53
58
 
54
59
  if affected_rows < expected_rows
55
60
  raise_on_non_pk_duplicate_warning
@@ -58,7 +63,7 @@ module Lhm
58
63
  if @throttler && affected_rows > 0
59
64
  @throttler.run
60
65
  end
61
-
66
+
62
67
  @next_to_insert = top + 1
63
68
  @printer.notify(bottom, @limit)
64
69
 
@@ -107,13 +112,5 @@ module Lhm
107
112
  @chunk_finder.validate
108
113
  end
109
114
 
110
- # Only log the chunker progress every 5 minutes instead of every iteration
111
- def rate_limited_log_progress
112
- current_time = Time.now
113
- if current_time - @start_time > (5 * 60)
114
- Lhm.logger.info("Inserted #{affected_rows} rows into the destination table from #{bottom} to #{top}")
115
- @start_time = current_time
116
- end
117
- end
118
115
  end
119
116
  end
data/lib/lhm/version.rb CHANGED
@@ -2,5 +2,5 @@
2
2
  # Schmidt
3
3
 
4
4
  module Lhm
5
- VERSION = '3.4.1'
5
+ VERSION = '3.4.2'
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lhm-shopify
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 3.4.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - SoundCloud
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2021-09-23 00:00:00.000000000 Z
15
+ date: 2021-09-28 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: retriable