miga-base 1.1.1.1 → 1.1.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miga/cli/action/init/files_helper.rb +1 -1
- data/lib/miga/daemon/base.rb +9 -2
- data/lib/miga/daemon.rb +1 -1
- data/lib/miga/dataset.rb +2 -2
- data/lib/miga/project/dataset.rb +6 -2
- data/lib/miga/version.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2a98a1a14ae95edb9235f4fa87431f503443e75288e63448758eda076ad89f20
|
4
|
+
data.tar.gz: 1dd1771501ac7935466a0255161bb50c75bc47376e80c595b11033f0c1a53cd6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c895fafe9bc993a28b73cf0383b6f6522ed44d8ffdf7845d381ddb1f7c06d10edf31aaae8929212d1706dda2af8b3cbacc5f334a449331adafb513b55ff1c31
|
7
|
+
data.tar.gz: 892116a76fa3ff29cd396f961ed30a07c41322fcc0ecf301a70b5d8b1e0d68009ac27be7ab360d6441c8189ae8b191f450cd654c556c9b7771d604b1ca976211
|
@@ -4,7 +4,7 @@
|
|
4
4
|
# Helper module with files configuration functions for MiGA::Cli::Action::Init
|
5
5
|
module MiGA::Cli::Action::Init::FilesHelper
|
6
6
|
def open_rc_file
|
7
|
-
rc_path = File.expand_path('.miga_rc', ENV['
|
7
|
+
rc_path = File.expand_path('.miga_rc', ENV['MIGA_HOME'])
|
8
8
|
if File.exist? rc_path
|
9
9
|
if cli.ask_user(
|
10
10
|
'I found a previous configuration. Do you want to continue?',
|
data/lib/miga/daemon/base.rb
CHANGED
@@ -12,9 +12,10 @@ module MiGA::Daemon::Base
|
|
12
12
|
k = k.to_sym
|
13
13
|
unless v.nil?
|
14
14
|
case k
|
15
|
-
when :latency, :maxjobs, :ppn, :ppn_project, :format_version, :verbosity
|
15
|
+
when :latency, :maxjobs, :ppn, :ppn_project, :format_version, :verbosity,
|
16
|
+
:skip_maintenance
|
16
17
|
v = v.to_i
|
17
|
-
if !force && v == 0 && k
|
18
|
+
if !force && v == 0 && !%i[verbosity skip_maintenance].include?(k)
|
18
19
|
raise "Daemon's #{k} cannot be set to zero"
|
19
20
|
end
|
20
21
|
when :shutdown_when_done, :show_log, :bypass_maintenance
|
@@ -50,6 +51,12 @@ module MiGA::Daemon::Base
|
|
50
51
|
runopts(:nodelist)
|
51
52
|
end
|
52
53
|
|
54
|
+
##
|
55
|
+
# Returns the number of times maintenance should be skipped before running
|
56
|
+
def skip_maintenance
|
57
|
+
runopts(:skip_maintenance) || 0
|
58
|
+
end
|
59
|
+
|
53
60
|
##
|
54
61
|
# Returns the running option +opt+ in jobs for +what+. +what+ can be
|
55
62
|
# +:dataset+ or +:projects+
|
data/lib/miga/daemon.rb
CHANGED
data/lib/miga/dataset.rb
CHANGED
@@ -107,7 +107,7 @@ class MiGA::Dataset < MiGA::MiGA
|
|
107
107
|
metadata[:warn] = "Inactive: #{reason}" unless reason.nil?
|
108
108
|
metadata[:inactive] = true
|
109
109
|
metadata.save
|
110
|
-
project.recalculate_tasks(
|
110
|
+
project.recalculate_tasks("Reference dataset inactivated: #{name}") if ref?
|
111
111
|
pull_hook :on_inactivate
|
112
112
|
end
|
113
113
|
|
@@ -117,7 +117,7 @@ class MiGA::Dataset < MiGA::MiGA
|
|
117
117
|
metadata[:inactive] = nil
|
118
118
|
metadata[:warn] = nil if metadata[:warn] && metadata[:warn] =~ /^Inactive: /
|
119
119
|
metadata.save
|
120
|
-
project.recalculate_tasks(
|
120
|
+
project.recalculate_tasks("Reference dataset activated: #{name}") if ref?
|
121
121
|
pull_hook :on_activate
|
122
122
|
end
|
123
123
|
|
data/lib/miga/project/dataset.rb
CHANGED
@@ -52,7 +52,9 @@ module MiGA::Project::Dataset
|
|
52
52
|
@metadata[:datasets] << name
|
53
53
|
@dataset_names_hash = nil # Ensure loading even if +do_not_save+ is true
|
54
54
|
save
|
55
|
-
|
55
|
+
if d.ref? && d.active?
|
56
|
+
recalculate_tasks("Reference dataset added: #{d.name}")
|
57
|
+
end
|
56
58
|
pull_hook(:on_add_dataset, name)
|
57
59
|
end
|
58
60
|
dataset(name)
|
@@ -66,7 +68,9 @@ module MiGA::Project::Dataset
|
|
66
68
|
|
67
69
|
self.metadata[:datasets].delete(name)
|
68
70
|
save
|
69
|
-
|
71
|
+
if d.ref? && d.active?
|
72
|
+
recalculate_tasks("Reference dataset unlinked: #{d.name}")
|
73
|
+
end
|
70
74
|
pull_hook(:on_unlink_dataset, name)
|
71
75
|
d
|
72
76
|
end
|
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.1,
|
15
|
+
VERSION = [1.1, 2, 3].freeze
|
16
16
|
|
17
17
|
##
|
18
18
|
# Nickname for the current major.minor version.
|
@@ -20,7 +20,7 @@ module MiGA
|
|
20
20
|
|
21
21
|
##
|
22
22
|
# Date of the current gem relese.
|
23
|
-
VERSION_DATE = Date.new(2021,
|
23
|
+
VERSION_DATE = Date.new(2021, 11, 16)
|
24
24
|
|
25
25
|
##
|
26
26
|
# References of MiGA
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miga-base
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luis M. Rodriguez-R
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: daemons
|