find all monitors and add to job scheduler will use it to get monitors program's cgz.
Signed-off-by: Wei Jihui weijihuiall@163.com --- lib/job.rb | 7 +++++++ sbin/submit | 1 + 2 files changed, 8 insertions(+)
diff --git a/lib/job.rb b/lib/job.rb index caa76c4b..e2416eb8 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -564,6 +564,13 @@ class Job return option_value end
+ def add_monitors + @job['monitors'] = {} + for_each_in(@job, monitor_params) do |_pk, _h, m_n, _m_args| + @job['monitors'][m_n] = nil + end + end + def add_pp() @job["pp"] = Hash.new() init_program_options() diff --git a/sbin/submit b/sbin/submit index a749ea20..8b46db32 100755 --- a/sbin/submit +++ b/sbin/submit @@ -108,6 +108,7 @@ ARGV.each do |jobfile| raise 'Please configure SCHED_PORT' unless job['SCHED_PORT']
job.add_pp + job.add_monitors job.add_define_files if opt_auto_define_files
# get job shell function
On Tue, Oct 20, 2020 at 08:16:02PM +0800, Wei Jihui wrote:
find all monitors and add to job scheduler will use it to get monitors program's cgz.
Signed-off-by: Wei Jihui weijihuiall@163.com
lib/job.rb | 7 +++++++ sbin/submit | 1 + 2 files changed, 8 insertions(+)
diff --git a/lib/job.rb b/lib/job.rb index caa76c4b..e2416eb8 100755 --- a/lib/job.rb +++ b/lib/job.rb @@ -564,6 +564,13 @@ class Job return option_value end
- def add_monitors
- @job['monitors'] = {}
- for_each_in(@job, monitor_params) do |_pk, _h, m_n, _m_args|
@job['monitors'][m_n] = nil
Maybe you can change m_n a more meaningful word?
Thanks, Yuanchao