Skip to content

Commit

Permalink
Bump activerecord from 6.1.4.1 to 6.1.6.1 (#6)
Browse files Browse the repository at this point in the history
* Bump activerecord from 6.1.4.1 to 6.1.6.1

Bumps [activerecord](https://github.com/rails/rails) from 6.1.4.1 to 6.1.6.1.
- [Release notes](https://github.com/rails/rails/releases)
- [Changelog](https://github.com/rails/rails/blob/v7.0.3.1/activerecord/CHANGELOG.md)
- [Commits](rails/rails@v6.1.4.1...v6.1.6.1)

---
updated-dependencies:
- dependency-name: activerecord
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* Fix rubocop warnings

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Alejandro Beiderman <abeiderman@gmail.com>
  • Loading branch information
dependabot[bot] and abeiderman committed Jul 12, 2022
1 parent fce7ad6 commit 306c7b0
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 19 deletions.
20 changes: 10 additions & 10 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ PATH
GEM
remote: https://rubygems.org/
specs:
activemodel (6.1.4.1)
activesupport (= 6.1.4.1)
activerecord (6.1.4.1)
activemodel (= 6.1.4.1)
activesupport (= 6.1.4.1)
activesupport (6.1.4.1)
activemodel (6.1.6.1)
activesupport (= 6.1.6.1)
activerecord (6.1.6.1)
activemodel (= 6.1.6.1)
activesupport (= 6.1.6.1)
activesupport (6.1.6.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
Expand All @@ -24,13 +24,13 @@ GEM
thor (>= 0.14.0)
ast (2.4.2)
coderay (1.1.3)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
diff-lcs (1.4.4)
docile (1.4.0)
i18n (1.8.11)
i18n (1.11.0)
concurrent-ruby (~> 1.0)
method_source (1.0.0)
minitest (5.14.4)
minitest (5.15.0)
mysql2 (0.5.3)
parallel (1.21.0)
parser (3.0.3.2)
Expand Down Expand Up @@ -83,7 +83,7 @@ GEM
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
zeitwerk (2.5.1)
zeitwerk (2.6.0)

PLATFORMS
ruby
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,14 @@ def generate_row_with_retries(row_number)
MSG

@logger.warn(
"[ActiveRecordDataLoader] "\
"[ActiveRecordDataLoader] " \
"Exhausted retries looking for unique values. Skipping row #{row_number} for '#{table}'."
)
return nil
else
@logger.info(
"[ActiveRecordDataLoader] "\
"Retrying row #{row_number} for '#{table}' looking for unique values compliant with indexes. "\
"[ActiveRecordDataLoader] " \
"Retrying row #{row_number} for '#{table}' looking for unique values compliant with indexes. " \
"Retry number #{retries}."
)
end
Expand Down
2 changes: 1 addition & 1 deletion lib/active_record_data_loader/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def validate_output(output)
elsif output.is_a?(String)
output
else
raise "The output configuration parameter must be a filename meant to be the "\
raise "The output configuration parameter must be a filename meant to be the " \
"target for the SQL script"
end
end
Expand Down
10 changes: 5 additions & 5 deletions lib/active_record_data_loader/table_loader.rb
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@ def load_data(batch_size, total_rows)
batch_count = (total_rows / batch_size.to_f).ceil

logger.info(
"[ActiveRecordDataLoader] "\
"Loading #{total_rows} row(s) into '#{strategy.table_name}' via #{strategy.name}. "\
"[ActiveRecordDataLoader] " \
"Loading #{total_rows} row(s) into '#{strategy.table_name}' via #{strategy.name}. " \
"#{batch_size} row(s) per batch, #{batch_count} batch(es)."
)
total_time = Benchmark.realtime do
load_in_batches(batch_size, total_rows, batch_count)
end
logger.info(
"[ActiveRecordDataLoader] "\
"Completed loading #{total_rows} row(s) into '#{strategy.table_name}' "\
"[ActiveRecordDataLoader] " \
"Completed loading #{total_rows} row(s) into '#{strategy.table_name}' " \
"in #{total_time} seconds."
)
end
Expand All @@ -49,7 +49,7 @@ def load_in_batches(batch_size, total_rows, batch_count)
time = Benchmark.realtime { strategy.load_batch(row_numbers, connection) }

logger.debug(
"[ActiveRecordDataLoader] "\
"[ActiveRecordDataLoader] " \
"Completed batch #{i + 1}/#{batch_count}, #{row_numbers.count} row(s) in #{time} seconds"
)
end
Expand Down

0 comments on commit 306c7b0

Please sign in to comment.