miga-base 1.1.3.3 → 1.1.4.0

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: 683a93a244b106eb24f94cff47695b28cc051701ecd4ea83b289a6650fdf3985
4
- data.tar.gz: 6ce192df7a66502535a5c24406d9d3f1d0a1d51c11f3fb6e08f353547661c053
3
+ metadata.gz: bb03f8cf2e7a3ebd138b0a4b4fcb393093ee18317a89d168f27c1e2f4ac687cd
4
+ data.tar.gz: ca50166c33ae2a93e32e5f44f570e1d3b3cacd0ce7361d4e58b9ba9cefbc0dfa
5
5
  SHA512:
6
- metadata.gz: cd07ba5ea8d3088ba9e7752c13bcdc07a0cf73175687c021e93c6df9361abd6dab361ffaed562f421f551999deee3de4f32d388f96f050ff45750d22bbe3eaf3
7
- data.tar.gz: 18ba878127bc0abb7aed7b63398091cc2ed0fbee0d8629850a25d26ab9690f4489a8aca4fa8a3e2f2a8d4e80bdf1fd065511c23774327e988fac9ff0df645041
6
+ metadata.gz: f95b279c12c9e4735a7507795698fed578c28b904cb867caadebcd9f3ea0ba4592ef7d8763425cf0d6d1806f6afc1801ffa2b0db8341498c5e4c8d1ca2689214
7
+ data.tar.gz: f54a2e738c2ae885bda629d216f45d9b139bd64d68e99b95f02ea328a1f0c26138314a621ef63a836391559be703b24b78d2f83dadf496c94bc5f61a78e1abe7
@@ -38,9 +38,13 @@ class MiGA::Cli::Action::Daemon < MiGA::Cli::Action
38
38
  'Path to the list of execution hostnames'
39
39
  ) { |v| cli[:nodelist] = v }
40
40
  opt.on(
41
- '--ppn INT',
41
+ '--ppn INT', Integer,
42
42
  'Maximum number of cores to use in a single job'
43
- ) { |v| cli[:ppn] = v.to_i }
43
+ ) { |v| cli[:ppn] = v }
44
+ opt.on(
45
+ '--ppn-project INT', Integer,
46
+ 'Maximum number of cores to use in project-wide tasks'
47
+ ) { |v| cli[:ppn_project] = v }
44
48
  opt.on(
45
49
  '--json PATH',
46
50
  'Path to a custom daemon definition in json format'
@@ -81,7 +85,7 @@ class MiGA::Cli::Action::Daemon < MiGA::Cli::Action
81
85
  # Configure and run daemon
82
86
  p = cli.load_project
83
87
  d = MiGA::Daemon.new(p, cli[:json])
84
- dopts = %i[latency maxjobs nodelist ppn shutdown_when_done]
88
+ dopts = %i[latency maxjobs nodelist ppn ppn_project shutdown_when_done]
85
89
  dopts.each { |k| d.runopts(k, cli[k]) }
86
90
  d.show_log! if cli[:show_log]
87
91
  d.daemon(cli.operation, cli[:daemon_opts])
data/lib/miga/project.rb CHANGED
@@ -121,4 +121,11 @@ class MiGA::Project < MiGA::MiGA
121
121
  def active?
122
122
  true
123
123
  end
124
+
125
+ ##
126
+ # Load or recover the project's daemon
127
+ def daemon
128
+ require 'miga/daemon'
129
+ @daemon ||= MiGA::Daemon.new(self)
130
+ end
124
131
  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, 3, 3].freeze
15
+ VERSION = [1.1, 4, 0].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, 11, 29)
23
+ VERSION_DATE = Date.new(2021, 12, 7)
24
24
 
25
25
  ##
26
26
  # References of MiGA
@@ -2954,10 +2954,12 @@ def merge_db(recipient, donors, donor_file, verbose, threads):
2954
2954
  pass
2955
2955
  except:
2956
2956
  #Error
2957
- shutil.rmtree(temp_dir)
2957
+ if os.path.exists(temp_dir):
2958
+ shutil.rmtree(temp_dir)
2958
2959
  finally:
2959
2960
  #Success
2960
- shutil.rmtree(temp_dir)
2961
+ if os.path.exists(temp_dir):
2962
+ shutil.rmtree(temp_dir)
2961
2963
 
2962
2964
  print("\nDatabases merged!")
2963
2965
 
@@ -155,7 +155,7 @@ module MiGA::DistanceRunner::Commands
155
155
  # Build target database
156
156
  f1 = tmp_file
157
157
  if donors.size == 1
158
- File.copy(donors.first, f1)
158
+ FileUtils.cp(donors.first, f1)
159
159
  else
160
160
  File.open(f0 = tmp_file, 'w') { |fh| donors.each { |i| fh.puts i } }
161
161
  run_cmd(
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.3.3
4
+ version: 1.1.4.0
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-29 00:00:00.000000000 Z
11
+ date: 2021-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: daemons