(file) Return to gatekeeper.restart CVS log (file) (dir) Up to [Development] / JSOC / proj / workflow

File: [Development] / JSOC / proj / workflow / gatekeeper.restart (download)
Revision: 1.7, Thu May 8 15:47:18 2014 UTC (8 years, 7 months ago) by jeneen
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, Ver_9-2, Ver_9-1, Ver_9-0, Ver_8-8, Ver_8-7, Ver_8-6, Ver_8-5, Ver_8-12, Ver_8-11, Ver_8-10, HEAD
Changes since 1.6: +2 -2 lines
Added path to gatekeeper.csh

#! /bin/csh -f


source $HOME/.cshrc
source $HOME/.login
setenv WORKFLOW_DATA /home/jsoc/pipeline
#setenv WORKFLOW_ROOT /home/phil/jsoc/proj/workflow
setenv WORKFLOW_ROOT /home/jsoc/cvs/Development/JSOC/proj/workflow

cd $WORKFLOW_DATA
# restart gatekeeper and put log in pipeline directory.

echo " "
echo -n Restart gatekeeper at " "
date
echo -n "On "
hostname

rm -f Keep_running
set loopcount=0
echo -n Waiting
while (-e GATEKEEPERBUSY)
  sleep 1
  echo -n '.'
  @ loopcount = $loopcount + 1
  if ($loopcount > 120) then
    echo Give up waiting after 2 minutes
    rm -f GATEKEEPERBUSY
    endif
end
echo " "

# allow extra time to simulate normal gatekeeper sleep.
sleep 10

echo -n "Gatekeeper PID = "
/home/jsoc/cvs/Development/JSOC/proj/workflow/gatekeeper.csh >& log &

set gatekeeper_status = $status

if ($gatekeeper_status || -e GATEKEEPERBUSY) then
  echo -n "XXX gatekeeper failed at "
  date
  echo "XXX Status was $gatekeeper_status"
  rm -f GATEKEEPERBUSY
  rm -f Keep_running
  echo "XXX force restart"
#  /home/phil/jsoc/proj/workflow/gatekeeper.restart >> /home/jsoc/pipeline/restart.log &
  /home/jsoc/cvs/Development/JSOC/proj/workflow/gatekeeper.restart >> /home/jsoc/pipeline/restart.log &
else
  echo -n Gatekeeper stopped by operator at " "
  date
endif

Karen Tian
Powered by
ViewCVS 0.9.4