forked from ISTI-ansible-roles/ansible-roles
library/roles/smartgears/dataminer_app/templates/algorithms-updater.j2: Fix the check_lock_file function. See https://support.d4science.org/issues/11079
This commit is contained in:
parent
7ae28d8316
commit
cc9a426761
|
@ -38,7 +38,7 @@ function check_lock_file() {
|
||||||
if [ -f $LOCK_FILE ] ; then
|
if [ -f $LOCK_FILE ] ; then
|
||||||
set +o pipefail
|
set +o pipefail
|
||||||
set +e
|
set +e
|
||||||
RUNNING_JOB=$( ps auwwx | grep `cat $LOCK_FILE` | grep -v grep )
|
RUNNING_JOB=$( /bin/pidof -s -x /usr/local/bin/algorithms-updater )
|
||||||
RUNNING_JOB_RETVAL=$?
|
RUNNING_JOB_RETVAL=$?
|
||||||
if [ $RUNNING_JOB_RETVAL -eq 0 ] ; then
|
if [ $RUNNING_JOB_RETVAL -eq 0 ] ; then
|
||||||
logger 'algorithms-updater: another job still running, exiting.'
|
logger 'algorithms-updater: another job still running, exiting.'
|
||||||
|
|
Loading…
Reference in New Issue