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

File: [Development] / JSOC / proj / workflow / checkbadtasks.csh (download) / (as text)
Revision: 1.5, Fri Feb 1 20:55:06 2019 UTC (3 years, 10 months ago) by jeneen
Branch: MAIN
CVS Tags: Ver_LATEST, Ver_9-5, Ver_9-41, Ver_9-4, Ver_9-3, HEAD
Changes since 1.4: +2 -2 lines
Removed harp images from list of tasks to check.

#! /bin/csh -f

set TIME_CONVERT = /home/jsoc/cvs/Development/JSOC/bin/$JSOC_MACHINE/time_convert
@ YEAR = `date +%Y`
set bad = 0

foreach ticket ( $WORKFLOW_DATA/tasks/*/active/*$YEAR*/ticket )
  @ lines = `wc -l $ticket | awk '{print $1}'`
  if ( $lines < 5 ) then
     echo ""
     echo "*** BAD TICKET(S) ***"
     ls $ticket 
     set bad = 1
  endif

end

foreach low ( `ls -1 $WORKFLOW_DATA/gates/*/low | grep -v lev0 | grep -v Synop | grep -v Limb | grep -v harpImages` )
  @ lines = `wc -l $low | awk '{print $1}'`
  if ( $lines < 1 ) then
     echo ""
     echo "*** BAD LOW FILE(S) ***"
     ls $low
     set bad = 1
  endif
  set Ltime = `cat $low`
  @ Ltime_s = `$TIME_CONVERT time=$Ltime`
  if ( $Ltime_s < 0 ) then
    echo ""
    echo "*** BAD LOW FILE(S) ***"
    ls $low
    set bad = 1
  endif
end

foreach high ( `ls -1 $WORKFLOW_DATA/gates/*/high | grep -v lev0 | grep -v Synop | grep -v Limb | grep -v harpImages` )
  @ lines = `wc -l $high | awk '{print $1}'`
  if ( $lines < 1 ) then
     echo ""
     echo "*** BAD HIGH FILE(S) ***"
     ls $high
     set bad = 1
  endif
  set Htime = `cat $high`
  @ Htime_s = `$TIME_CONVERT time=$Htime`
  if ( $Htime_s < 0 ) then
    echo ""
    echo "*** BAD HIGH FILE(S) ***"
    ls $high
    set bad = 1
  endif
end

foreach next ( $WORKFLOW_DATA/gates/*/nextupdate )
  @ lines = `wc -l $next | awk '{print $1}'`
  if ( $lines < 1 ) then
     echo""
     echo "*** BAD NEXTUPDATE FILE(S) ***"
     ls $next
     set bad = 1
  endif
  set nextt = `cat $next`
  @ nextt_s = `$TIME_CONVERT time=$nextt`
  if ( $nextt_s < 0 ) then
    echo ""
    echo "*** BAD NEXTUPDATE FILE(S) ***"
    ls $next
    set bad = 1
  endif
end


if ( $bad == 0 ) then
  echo ""
  echo "All tickets, low, high, and nextupdate files are OK."
  echo ""
endif

Karen Tian
Powered by
ViewCVS 0.9.4