IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 26, 2009, 1:59:32 PM (17 years ago)
Author:
beaumont
Message:

merged with trunk

Location:
branches/cnb_branches/cnb_branch_20090301
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/cnb_branches/cnb_branch_20090301

  • branches/cnb_branches/cnb_branch_20090301/ippTasks/dist.pro

    r23594 r24244  
    1414$distToProcess_DB = 0
    1515$distToAdvance_DB = 0
     16$distQueue_DB = 0
    1617
    1718### Check status of tasks
     
    4142    active true
    4243  end
     44  task dist.queueruns
     45#   We aren't ready to run this task yet. It will queue much too much
     46#    active true
     47    active false
     48  end
    4349end
    4450macro dist.off
     
    5359  end
    5460  task dist.advance.run
     61    active false
     62  end
     63  task dist.queueruns
    5564    active false
    5665  end
     
    8089    end
    8190    add_poll_args run
     91    add_poll_labels run
    8292    command $run
    8393  end
     
    131141    book getword distToProcess $pageName state -var STATE
    132142    book getword distToProcess $pageName data_state -var DATA_STATE
     143    book getword distToProcess $pageName quality -var QUALITY
     144    book getword distToProcess $pageName no_magic -var NO_MAGIC
    133145    book getword distToProcess $pageName magicked -var MAGICKED
    134     book getword distToProcess $pageName outroot -var OUTROOT
     146    book getword distToProcess $pageName outdir -var OUTDIR
    135147    book getword distToProcess $pageName dbname -var DBNAME
    136     if ("$CLEAN" = "T")
    137         $CLEAN_ARG = "--clean"
    138     else
    139         $CLEAN_ARG = ""
     148
     149    $EXTRA_ARGS = ""
     150    if ("$CLEAN" == "T")
     151        $EXTRA_ARGS = --clean
    140152    end
    141153    # magicked is output as integer due to the union in the sql
    142154    if ($MAGICKED)
    143         $MAGICKED_ARG = "--magicked"
    144     else
    145         $MAGICKED_ARG = ""
     155        $EXTRA_ARGS = $EXTRA_ARGS --magicked
     156    end
     157    # no_magic is output as integer due to the union in the sql
     158    if ($NO_MAGIC)
     159        $EXTRA_ARGS = $EXTRA_ARGS --no_magic
     160    end
     161    if ($QUALITY)
     162        $EXTRA_ARGS = $EXTRA_ARGS --poor_quality
    146163    end
    147164
     
    150167    host anyhost
    151168
    152     sprintf logfile "%s/dist.%s.%s.log" $OUTROOT $DIST_ID $COMPONENT
    153 
    154     $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $MAGICKED_ARG $CLEAN_ARG --outroot $OUTROOT --logfile $logfile
     169    sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT
     170    stdout $logfile
     171    stderr $logfile
     172
     173    $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --chip_path_base $CHIP_PATH_BASE --state $STATE --data_state $DATA_STATE $EXTRA_ARGS --outdir $OUTDIR --logfile $logfile
    155174
    156175    add_standard_args run
     
    202221    end
    203222    add_poll_args run
     223    add_poll_labels run
    204224    command $run
    205225  end
     
    246266    book getword distToAdvance $pageName stage   -var STAGE
    247267    book getword distToAdvance $pageName stage_id -var STAGE_ID
    248     book getword distToAdvance $pageName outroot -var OUTROOT
     268    book getword distToAdvance $pageName outdir -var OUTDIR
     269    book getword distToAdvance $pageName clean -var CLEAN
     270    book getword distToAdvance $pageName dbname -var DBNAME
     271    $EXTRA_ARGS = ""
     272    if ("$CLEAN" == "T")
     273        $EXTRA_ARGS = --clean
     274    end
    249275
    250276    host anyhost
    251277
    252     sprintf logfile "%s/dist.advance.%s.log" $OUTROOT $DIST_ID
    253 
    254     $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outroot $OUTROOT --logfile $logfile
     278    sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID
     279    stdout $logfile
     280    stderr $logfile
     281
     282    $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
    255283    add_standard_args run
    256284
     
    277305end
    278306
     307task           dist.queueruns
     308#  host         local
     309
     310  periods      -poll $RUNPOLL
     311  periods      -exec 30
     312  periods      -timeout 45
     313  npending     1
     314
     315  active false
     316
     317#  stdout $LOGDIR/dist.queuruns
     318#  stderr $LOGDIR/dist.queueruns
     319
     320  task.exec
     321    $MYARGS = ""
     322    # assume that we need magic unless we are running simtest
     323    if ($?SIMTEST_CAMERA != 0)
     324        $MYARGS = --no_magic
     325    end
     326
     327    $run = dist_queue_runs.pl $MYARGS --stage_limit 16 --logfile $LOGDIR/dist.queueruns
     328
     329    if ($DB:n == 0)
     330       $DBNAME = DEFAULT
     331    else
     332      # save the DB name for add_standard_args
     333      $DBNAME =  $DB:$distQueue_DB
     334      $distQueue_DB ++
     335      if ($distQueue_DB >= $DB:n) set distQueue_DB = 0
     336    end
     337
     338    host anyhost
     339
     340    add_standard_args run
     341
     342    # create the command line
     343    if ($VERBOSE > 1)
     344      echo command $run
     345    end
     346    command $run
     347  end
     348
     349  task.exit     $EXIT_SUCCESS
     350    # nothing to do
     351  end
     352
     353  # default exit status
     354  task.exit    default
     355    showcommand failure
     356  end
     357
     358  # operation timed out?
     359  task.exit    timeout
     360    showcommand timeout
     361  end
     362
     363  # operation timed out?
     364  task.exit    crash
     365    showcommand crash
     366  end
     367end
Note: See TracChangeset for help on using the changeset viewer.