IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Mar 30, 2012, 2:49:37 PM (14 years ago)
Author:
eugene
Message:

merge changes from trunk

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20111122/ippTasks/addstar.pro

    r32851 r33638  
    2626    active true
    2727  end
    28   task addstar.exp.load.staticsky_multi
    29     active true
    30   end 
    3128  task addstar.exp.run
    3229    active true
     
    4441    active false
    4542  end
    46   task addstar.exp.load.staticsky_multi
    47     active false
    48   end
    4943  task addstar.exp.run
    5044    active false
     
    5347
    5448macro addstar.revert.off
    55   task addstar.revert
     49  task addstar.revert.cam
     50    active false
     51  end
     52 task addstar.revert.stack
     53    active false
     54  end
     55 task addstar.revert.staticsky
    5656    active false
    5757  end
    5858end
    5959macro addstar.revert.on
    60   task addstar.revert
     60  task addstar.revert.cam
     61    active true
     62  end
     63  task addstar.revert.stack
     64    active true
     65  end
     66  task addstar.revert.staticsky
    6167    active true
    6268  end
     
    6571
    6672# this variable will cycle through the known database names
    67 $addstar_DB = 0
    68 $addstar_revert_DB = 0
     73$addstar_DB = 0
     74#this may not work for more databases (addstar) will do that later)
     75$addstar_revert_DB_C = 0
     76$addstar_revert_DB_S = 0
     77$addstar_revert_DB_SS = 0
     78$addstar_revert_DB_SSM = 0
    6979
    7080
     
    237247end
    238248
    239 task           addstar.exp.load.staticsky_multi
    240   host         local
    241 
    242   periods      -poll $LOADPOLL
    243   periods      -exec $LOADEXEC
    244   periods      -timeout 30
    245   npending     1
    246 
    247   stdout NULL
    248   stderr $LOGDIR/addstar.exp.log
    249 
    250   task.exec
    251    # if ($LABEL:n == 0) break
    252     $run = addtool -pendingexp -stage staticsky_multi
    253     if ($DB:n == 0)
    254       option DEFAULT
    255     else
    256       # save the DB name for the exit tasks
    257       option $DB:$addstar_DB
    258       $run = $run -dbname $DB:$addstar_DB
    259       $addstar_DB ++
    260       if ($addstar_DB >= $DB:n) set addstar_DB = 0
    261     end
    262     add_poll_args run
    263     add_poll_labels run
    264     command $run
    265   end
    266 
    267   # success
    268   task.exit    0
    269     # convert 'stdout' to book format
    270     ipptool2book stdout addPendingExp -key add_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    271     if ($VERBOSE > 2)
    272       book listbook addPendingExp
    273     end
    274 
    275     # delete existing entries in the appropriate pantaskStates
    276     process_cleanup addPendingExp
    277   end
    278 
    279   # default exit status
    280   task.exit    default
    281     showcommand failure
    282   end
    283 
    284   task.exit    crash
    285     showcommand crash
    286   end
    287 
    288   # operation times out?
    289   task.exit    timeout
    290     showcommand timeout
    291   end
    292 end
    293 
    294249
    295250# run the addstar script on pending exposures
     
    318273    book getword addPendingExp $pageName stage_extra1 -var STAGE_EXTRA1
    319274    book getword addPendingExp $pageName stageroot -var STAGEROOT
    320     book getword addPendingExp $pageName stage -var STAGE 
     275    book getword addPendingExp $pageName stage -var STAGE
     276    book getword addPendingExp $pageName stage_id -var STAGE_ID
    321277    book getword addPendingExp $pageName workdir -var WORKDIR_TEMPLATE
    322278    book getword addPendingExp $pageName reduction -var REDUCTION
     
    350306        sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID
    351307    end
    352     if ("$STAGE" == "staticsky_multi")
    353         sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID
    354     end
    355308    if ("$STAGE" == "stack")
    356309        sprintf outroot "%s.add.%s" $STAGEROOT $ADD_ID
     
    365318      $run = $run --reduction $REDUCTION
    366319    end
    367     if ("$STAGE" == "staticsky_multi")
     320    if ("$STAGE" == "staticsky")
    368321      $run = $run --multi_num $STAGE_EXTRA1
     322    end
     323    if ("$STAGE" == "cam")
     324      $run = $run --stage_id $STAGE_ID
    369325    end
    370326    if ("$IMAGE_ONLY" == "T")
     
    411367end
    412368
    413 task addstar.revert
     369task addstar.revert.cam
    414370  host         local
    415371
     
    425381  task.exec
    426382    if ($LABEL:n == 0) break
    427     $run = addtool -revertprocessedexp
     383    $run = addtool -revertprocessedexp -stage cam
    428384    if ($DB:n == 0)
    429385      option DEFAULT
    430386    else
    431387      # save the DB name for the exit tasks
    432       option $DB:$addstar_revert_DB
    433       $run = $run -dbname $DB:$addstar_revert_DB
    434       $addstar_revert_DB ++
    435       if ($addstar_revert_DB >= $DB:n) set addstar_revert_DB = 0
     388      option $DB:$addstar_revert_DB_C
     389      $run = $run -dbname $DB:$addstar_revert_DB_C
     390      $addstar_revert_DB_C ++
     391      if ($addstar_revert_DB_C >= $DB:n) set addstar_revert_DB_C = 0
    436392    end
    437393    add_poll_labels run
     
    457413  end
    458414end
     415task addstar.revert.stack
     416  host         local
     417
     418  periods      -poll 5.0
     419  periods      -exec 60.0
     420  periods      -timeout 1200
     421  npending     1
     422  active        false
     423
     424  stdout NULL
     425  stderr $LOGDIR/revert.log
     426
     427  task.exec
     428    if ($LABEL:n == 0) break
     429    $run = addtool -revertprocessedexp -stage stack
     430    if ($DB:n == 0)
     431      option DEFAULT
     432    else
     433      # save the DB name for the exit tasks
     434      option $DB:$addstar_revert_DB_S
     435      $run = $run -dbname $DB:$addstar_revert_DB_S
     436      $addstar_revert_DB_S ++
     437      if ($addstar_revert_DB_S >= $DB:n) set addstar_revert_DB_S = 0
     438    end
     439    add_poll_labels run
     440    command $run
     441  end
     442
     443  # success
     444  task.exit    0
     445  end
     446
     447  # locked list
     448  task.exit    default
     449    showcommand failure
     450  end
     451
     452  task.exit    crash
     453    showcommand crash
     454  end
     455
     456  # operation times out?
     457  task.exit    timeout
     458    showcommand timeout
     459  end
     460end
     461
     462task addstar.revert.staticsky
     463  host         local
     464
     465  periods      -poll 5.0
     466  periods      -exec 60.0
     467  periods      -timeout 1200
     468  npending     1
     469  active        false
     470
     471  stdout NULL
     472  stderr $LOGDIR/revert.log
     473
     474  task.exec
     475    if ($LABEL:n == 0) break
     476    $run = addtool -revertprocessedexp -stage staticsky
     477    if ($DB:n == 0)
     478      option DEFAULT
     479    else
     480      # save the DB name for the exit tasks
     481      option $DB:$addstar_revert_DB_SSM
     482      $run = $run -dbname $DB:$addstar_revert_DB_SSM
     483      $addstar_revert_DB_SSM ++
     484      if ($addstar_revert_DB_SSM >= $DB:n) set addstar_revert_DB_SSM = 0
     485    end
     486    add_poll_labels run
     487    command $run
     488  end
     489
     490  # success
     491  task.exit    0
     492  end
     493
     494  # locked list
     495  task.exit    default
     496    showcommand failure
     497  end
     498
     499  task.exit    crash
     500    showcommand crash
     501  end
     502
     503  # operation times out?
     504  task.exit    timeout
     505    showcommand timeout
     506  end
     507end
Note: See TracChangeset for help on using the changeset viewer.