IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 19, 2007, 5:24:59 PM (19 years ago)
Author:
eugene
Message:

converting to book version

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippTasks/pantasks.pro

    r10760 r11210  
    1818$runexec = 1
    1919
     20$EXIT_SUCCESS     = 0
     21$EXIT_UNKNOWN_ERR = 1
     22$EXIT_SYS_ERR     = 2
     23$EXIT_CONFIG_ERR  = 3
     24$EXIT_PROG_ERR    = 4
     25$EXIT_DATA_ERR    = 5
     26
     27$DB:n = 0
     28
     29macro init.simtest
     30  $LOGDIR = `ipp_datapath.pl path://SIMTEST`
     31  $LOGDIR = $LOGDIR/logs
     32  exec mkdir -p $LOGDIR
     33
     34  list DB -add simtest
     35
     36  if ($parallel)
     37    controller exit true
     38    controller host add alala
     39  end
     40end
     41
    2042macro init.essence
    2143  $LOGDIR = `ipp_datapath.pl path://ESSENCE`
    2244  $LOGDIR = $LOGDIR/logs
    2345  exec mkdir -p $LOGDIR
     46
     47  list DB -add essence_v2
    2448
    2549  if ($parallel)
     
    3660  $LOGDIR = $LOGDIR/logs
    3761  exec mkdir -p $LOGDIR
     62
     63  list DB -add isptest
    3864
    3965  if ($parallel)
     
    5581macro load.tasks
    5682  input $scripts/phase0.pro
    57   input $scripts/phase2.pro
     83#  input $scripts/phase2.pro
    5884# input $scripts/phase3.pro
    5985
     
    75101    if ($0 == 2)
    76102      echo "$1 for: $command"
     103      echo "job exit status: $JOB_STATUS"
     104      echo "job dtime: $JOB_DTIME"
    77105    else
    78106      echo "command: $command"
     
    80108  end
    81109end
     110
     111macro process_exit
     112  if ($0 != 4)
     113    echo "USAGE: process_exit (bookName) (pageName) (exitCode)"
     114    break
     115  end
     116
     117  $bookName = $1
     118  $pageName = $2
     119  $exitCode = $3
     120
     121  # success
     122  if ($exitCode == $EXIT_SUCCESS)
     123    # the handler scripts update DB the tables; here we just update the page
     124    book setword $bookName $pageName state DONE
     125    return
     126  end
     127
     128  # failure related to the data files
     129  # jobs which result in DATAERR must have db state updated
     130  if ($exitCode == $EXIT_DATA_ERR)
     131    showcommand failure
     132    book setword $bookName $pageName state DATA_ERR
     133    return
     134  end
     135
     136  # failure related to the data files
     137  if ($exitCode == $EXIT_SYS_ERR)
     138    halt
     139    showcommand "system failure"
     140    book setword $bookName $pageName state SYS_ERR
     141    return
     142  end
     143
     144  # failure related to the data files
     145  if ($exitCode == $EXIT_CONFIG_ERR)
     146    halt
     147    showcommand "config error"
     148    book setword $bookName $pageName state CONFIG_ERR
     149    return
     150  end
     151
     152  # failure related to the data files
     153  if ($exitCode == $EXIT_PROG_ERR)
     154    halt
     155    showcommand "programming error"
     156    book setword $bookName $pageName state PROG_ERR
     157    return
     158  end
     159
     160  # any other exit status
     161  showcommand failure
     162  book setword $bookName $pageName state UNKNOWN_ERR
     163end
Note: See TracChangeset for help on using the changeset viewer.