Skip to content

Commit

Permalink
Merge branch 'master' into singu_integration
Browse files Browse the repository at this point in the history
  • Loading branch information
natacha-beck authored Aug 16, 2017
2 parents 4d16106 + 80825ea commit 2034a75
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
5 changes: 2 additions & 3 deletions BrainPortal/app/models/cluster_task.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1744,16 +1744,15 @@ def submit_cluster_job
trap got_sigxfsz XFSZ
date '+CBRAIN Task Starting At %s : %F %T'
echo '__CBRAIN_CAPTURE_PLACEHOLDER__' # where stdout captured below will be substituted
date '+CBRAIN Task Starting At %s : %F %T' 1>&2
echo '__CBRAIN_CAPTURE_PLACEHOLDER__' 1>&2 # where stderr captured below will be substituted
# stdout and stderr captured below will be re-substituted in
# the output and error of this script.
bash '#{sciencefile}' > #{science_stdout_basename} 2> #{science_stderr_basename} </dev/null
status="$?"
echo '__CBRAIN_CAPTURE_PLACEHOLDER__' # where stdout captured below will be substituted
echo '__CBRAIN_CAPTURE_PLACEHOLDER__' 1>&2 # where stderr captured below will be substituted
date "+CBRAIN Task Ending With Status $status After $SECONDS seconds, at %s : %F %T"
date "+CBRAIN Task Ending With Status $status After $SECONDS seconds, at %s : %F %T" 1>&2
Expand Down
5 changes: 3 additions & 2 deletions BrainPortal/lib/scir_slurm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,13 @@ def update_job_info_cache #:nodoc:
"squeue --format='%A %t' --noheader --user=#{CBRAIN::Rails_UserName.to_s.bash_escape}"
)
raise "Cannot get output of 'squeue'" if err_text.present?
out_lines = out_text.split('\n')
out_lines = out_text.split("\n")
@job_info_cache = {}
out_lines.each do |line| # "12345 R"
job_id, job_status = line.split(/\s+/)
next unless job_id.present? && job_status.present?
@job_info_cache[job_id] = { :drmaa_state => job_status }
state = statestring_to_stateconst(job_status)
@job_info_cache[job_id] = { :drmaa_state => state }
end
true
end
Expand Down

0 comments on commit 2034a75

Please sign in to comment.