miga-base 1.3.20.9 → 1.3.20.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/version.rb +1 -1
- data/utils/cleanup-databases.rb +8 -20
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 89f86ec82f63d08729e4f970919dba5762a2888c797cdf6a8a7f32805929508c
|
4
|
+
data.tar.gz: cb3e930ba1a4acb776bd7bcc7481470363109c2c01a67e1780f1d71dc29659c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa6434515aaca67b727e2a725cd2013e3096eb638cfc590e452c4e33c0e72f4c788b14cc0e8254cb91f14082330c038fa826ecab2cca01ccc2d4f96272ce0bac
|
7
|
+
data.tar.gz: f5aec44b327725934d7585e157a68a653c9567743c46120e90d5280638935194684829acaa0003ff14ed239ee07ead6a604e25d423743986f627cb379767614c
|
data/lib/miga/version.rb
CHANGED
@@ -12,7 +12,7 @@ module MiGA
|
|
12
12
|
# - String indicating release status:
|
13
13
|
# - rc* release candidate, not released as gem
|
14
14
|
# - [0-9]+ stable release, released as gem
|
15
|
-
VERSION = [1.3, 20,
|
15
|
+
VERSION = [1.3, 20, 10].freeze
|
16
16
|
|
17
17
|
##
|
18
18
|
# Nickname for the current major.minor version.
|
data/utils/cleanup-databases.rb
CHANGED
@@ -1,30 +1,18 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require 'thread'
|
4
3
|
require 'miga'
|
5
4
|
|
6
5
|
ARGV[1] or abort "Usage: #{$0} path/to/project threads"
|
7
6
|
|
8
7
|
p = MiGA::Project.load(ARGV[0])
|
9
|
-
|
10
|
-
thr = ARGV[1].to_i
|
8
|
+
thr = [ARGV[1].to_i, 1].max
|
11
9
|
|
12
|
-
|
13
|
-
|
10
|
+
p.say 'Cleaning Databases'
|
11
|
+
ds = p.dataset_ref_active
|
14
12
|
|
15
|
-
(
|
16
|
-
|
17
|
-
|
18
|
-
m.advance('Dataset:', idx + 1, dsn.size) if t == 0
|
19
|
-
next unless (idx % thr) == t
|
20
|
-
|
21
|
-
d = p.dataset(i)
|
22
|
-
next unless d.ref? && d.active?
|
23
|
-
|
24
|
-
d.cleanup_distances!
|
25
|
-
end
|
26
|
-
end
|
13
|
+
MiGA::Parallel.distribute(ds, thr) do |d, k, t|
|
14
|
+
p.advance('Dataset:', k, ds.size) if t == 0
|
15
|
+
d.cleanup_distances!
|
27
16
|
end
|
28
|
-
|
29
|
-
|
30
|
-
m.say
|
17
|
+
p.advance('Dataset:', ds.size, ds.size)
|
18
|
+
p.say
|