rbbt-util 5.37.16 → 5.38.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -447,26 +447,21 @@ begin
447
447
  require 'rbbt/workflow/remote_workflow'
448
448
  relay_dependencies = options.delete(:relay_dependencies).split(",")
449
449
  produce_dependencies_for_relay = options.delete(:produce_dependencies_for_relay)
450
- if relay_dependencies
451
- match_dependencies(relay_dependencies, job.rec_dependencies).each do |dep|
452
- RemoteWorkflow::SSH.relay_job(dep, server, :run_type => :run, :migrate => true, :produce_dependencies => produce_dependencies_for_relay)
453
- end
454
- else
455
- RemoteWorkflow::SSH.relay_job(job, server, :run_type => :run, :migrate => true, :produce_dependencies => produce_dependencies_for_relay)
456
- end
450
+
451
+ jobs_to_relay = relay_dependencies ? match_dependencies(relay_dependencies, job.rec_dependencies) : [job]
452
+ jobs_to_relay.reject!{|d| d.done? }
453
+
454
+ RemoteWorkflow::SSH.relay_job_list(jobs_to_relay, server, :run_type => :run, :migrate => true, :produce_dependencies => produce_dependencies_for_relay)
457
455
  end
458
456
 
459
457
  if server = options.delete(:slurm_relay)
460
458
  require 'rbbt/workflow/remote_workflow'
461
459
  relay_dependencies = options.delete(:relay_dependencies).split(",")
462
460
  produce_dependencies_for_relay = options.delete(:produce_dependencies_for_relay)
463
- if relay_dependencies
464
- match_dependencies(relay_dependencies, job.rec_dependencies).each do |dep|
465
- RemoteWorkflow::SSH.relay_job(dep, server, :run_type => :orchestrate, :migrate => true, :produce_dependencies => produce_dependencies_for_relay)
466
- end
467
- else
468
- RemoteWorkflow::SSH.relay_job(job, server, :run_type => :orchestrate, :migrate => true, :produce_dependencies => produce_dependencies_for_relay)
469
- end
461
+ jobs_to_relay = relay_dependencies ? match_dependencies(relay_dependencies, job.rec_dependencies) : [job]
462
+ jobs_to_relay.reject!{|d| d.done? }
463
+
464
+ RemoteWorkflow::SSH.relay_job_list(jobs_to_relay, server, :run_type => :orchestrate, :migrate => true, :produce_dependencies => produce_dependencies_for_relay)
470
465
  end
471
466
 
472
467
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rbbt-util
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.37.16
4
+ version: 5.38.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miguel Vazquez
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-30 00:00:00.000000000 Z
11
+ date: 2023-04-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake