Skip to content

Commit

Permalink
Multithread distances task in miga doctor
Browse files Browse the repository at this point in the history
  • Loading branch information
lmrodriguezr committed Mar 20, 2024
1 parent b43d9b1 commit 6ade0b4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions lib/miga/cli/action/doctor/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ def check_dist_fix(cli, p, fix)
return if fix.empty?

cli.say("- Fixing #{fix.size} datasets")
fix.each_with_index do |d_n, k|
cli.advance(' > Fixing', k + 1, fix.size, false)
MiGA::Parallel.distribute(fix, cli[:threads]) do |d_n, idx, thr|
cli.advance(' > Fixing', idx + 1, fix.size, false) if thr == 0
p.dataset(d_n).cleanup_distances!
end
cli.say
end

##
Expand Down
2 changes: 1 addition & 1 deletion lib/miga/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module MiGA
# - String indicating release status:
# - rc* release candidate, not released as gem
# - [0-9]+ stable release, released as gem
VERSION = [1.3, 13, 4].freeze
VERSION = [1.3, 13, 5].freeze

##
# Nickname for the current major.minor version.
Expand Down

0 comments on commit 6ade0b4

Please sign in to comment.