diff --git a/smartgears/dataminer_app/templates/algorithms-updater.j2 b/smartgears/dataminer_app/templates/algorithms-updater.j2 index 1dc27c29..866cfd54 100644 --- a/smartgears/dataminer_app/templates/algorithms-updater.j2 +++ b/smartgears/dataminer_app/templates/algorithms-updater.j2 @@ -38,7 +38,7 @@ function check_lock_file() { if [ -f $LOCK_FILE ] ; then set +o pipefail 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=$? if [ $RUNNING_JOB_RETVAL -eq 0 ] ; then logger 'algorithms-updater: another job still running, exiting.'