Method: OodCore::Job::Adapters::Slurm::Batch#submit_string
- Defined in:
- lib/ood_core/job/adapters/slurm.rb
#submit_string(str, args: [], env: {}) ⇒ String
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Submit a script expanded as a string to the batch server
284 285 286 287 288 |
# File 'lib/ood_core/job/adapters/slurm.rb', line 284 def submit_string(str, args: [], env: {}) args = args.map(&:to_s) + ["--parsable"] env = env.to_h.each_with_object({}) { |(k, v), h| h[k.to_s] = v.to_s } call("sbatch", *args, env: env, stdin: str.to_s).strip.split(";").first end |