diff --git a/caper/caper_backend.py b/caper/caper_backend.py index 85ed8224..18858068 100644 --- a/caper/caper_backend.py +++ b/caper/caper_backend.py @@ -299,7 +299,9 @@ class CaperBackendSLURM(dict): ${if defined(gpu) then '--nv' else ''} \ ${singularity} /bin/bash ${script}" """ - CHECK_ALIVE = "squeue -j ${job_id}" + CHECK_ALIVE = """CHK_ALIVE=$(squeue --noheader -j ${job_id} --format=%i | grep ${job_id}); if [ -z "$CHK_ALIVE" ]; \ +then /bin/bash -c 'exit 1'; else echo $CHK_ALIVE; fi""" + TEMPLATE = { "backend": { "providers": { diff --git a/setup.py b/setup.py index 0d902844..5c97edcc 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name='caper', - version='v0.2.6', + version='v0.2.7', python_requires='>3.4.1', scripts=['bin/caper', 'mysql/run_mysql_server_docker.sh', 'mysql/run_mysql_server_singularity.sh'],