Warning
This document is for an in-development version of Galaxy. You can alternatively view this page in the latest release if it exists or view the top of the latest release's documentation.
galaxy.jobs.runners.util.job_script packageļ
- galaxy.jobs.runners.util.job_script.job_script(template=<string.Template object>, **kwds)[source]ļ
>>> has_exception = False >>> try: job_script() ... except Exception as e: has_exception = True >>> has_exception True >>> script = job_script(working_directory='wd', command='uptime', exit_code_path='ec') >>> '\nuptime\n' in script True >>> 'GALAXY_LIB="None"' in script True >>> script.startswith('#!/bin/sh\n#PBS -test\n') False >>> script = job_script(working_directory='wd', command='uptime', exit_code_path='ec', headers='#PBS -test') >>> script.startswith('#!/bin/bash\n\n#PBS -test\n') True >>> script = job_script(working_directory='wd', command='uptime', exit_code_path='ec', slots_statement='GALAXY_SLOTS="$SLURM_JOB_NUM_NODES"') >>> script.find('GALAXY_SLOTS="$SLURM_JOB_NUM_NODES"\n') > 0 True >>> script = job_script(working_directory='wd', command='uptime', exit_code_path='ec', memory_statement='GALAXY_MEMORY_MB="32768"') >>> script.find('GALAXY_MEMORY_MB="32768"\n') > 0 True