IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 25625


Ignore:
Timestamp:
Sep 27, 2009, 11:34:24 AM (17 years ago)
Author:
eugene
Message:

merge changes from trunk

Location:
branches/eam_branches/20090715/ippTasks
Files:
10 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20090715/ippTasks/Makefile.am

    r25402 r25625  
    1717        warp.pro \
    1818        magic.pro \
     19        destreak.pro \
    1920        diff.pro \
    2021        stack.pro \
  • branches/eam_branches/20090715/ippTasks/diff.pro

    r24595 r25625  
    1414### Database lists
    1515$diffSkycell_DB = 0
     16$diffAdvance_DB = 0
    1617#$diffCleanup_DB = 0
    1718
     
    3637    active true
    3738  end
     39  task diff.advance
     40    active true
     41  end
    3842end
    3943
     
    4448  end
    4549  task diff.skycell.run
     50    active false
     51  end
     52  task diff.advance
    4653    active false
    4754  end
     
    198205  end
    199206end
     207
     208
     209# Advance exposures which have completed
     210task           diff.advance
     211  host         local
     212
     213  periods      -poll $LOADPOLL
     214#  periods      -exec $LOADEXEC
     215  periods      -exec 30
     216  periods      -timeout 60
     217  npending     1
     218
     219  stdout NULL
     220  stderr $LOGDIR/diff.advance.log
     221
     222  task.exec
     223    if ($LABEL:n == 0) break
     224    $run = difftool -advance
     225    if ($DB:n == 0)
     226      option DEFAULT
     227    else
     228      # save the DB name for the exit tasks
     229      option $DB:$diffAdvance_DB
     230      $run = $run -dbname $DB:$diffAdvance_DB
     231      $diffAdvance_DB ++
     232      if ($diffAdvance_DB >= $DB:n) set diffAdvance_DB = 0
     233    end
     234    add_poll_args run
     235    add_poll_labels run
     236    command $run
     237  end
     238
     239  # success
     240  task.exit    0
     241  end
     242
     243  # locked list
     244  task.exit    default
     245    showcommand failure
     246  end
     247
     248  task.exit    crash
     249    showcommand crash
     250  end
     251
     252  # operation times out?
     253  task.exit    timeout
     254    showcommand timeout
     255  end
     256end
     257
     258
    200259
    201260# # select images ready for diff analysis
  • branches/eam_branches/20090715/ippTasks/dist.pro

    r25402 r25625  
    1616$distQueue_DB = 0
    1717
     18### list of stages
     19#list of stages
     20$DIST_STAGE:n = 0
     21list DIST_STAGE -add "raw"
     22list DIST_STAGE -add "chip"
     23list DIST_STAGE -add "camera"
     24list DIST_STAGE -add "fake"
     25list DIST_STAGE -add "warp"
     26list DIST_STAGE -add "diff"
     27list DIST_STAGE -add "stack"
     28
     29$currentStage = 0
     30
    1831### Check status of tasks
    1932macro dist.status
     
    4255    active true
    4356  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
    49 end
     57end
     58
    5059macro dist.off
    5160  task dist.process.load
     
    5968  end
    6069  task dist.advance.run
    61     active false
    62   end
    63   task dist.queueruns
    6470    active false
    6571  end
     
    7480  npending     1
    7581
    76   stdout NULL
    77   stderr $LOGDIR/dist.process.log
    7882
    7983  task.exec
    80     $run = disttool -pendingcomponent
     84     # stdout NULL
     85     # stderr $LOGSUBDIR/dist.process.load.log
     86
     87    $run = disttool -pendingcomponent -stage $DIST_STAGE:$currentStage
     88    $currentStage ++
     89    if ($currentStage >= $DIST_STAGE:n) set currentStage = 0
     90
    8191    if ($DB:n == 0)
    8292      option DEFAULT
     
    8595      option $DB:$distToProcess_DB
    8696      $run = $run -dbname $DB:$distToProcess_DB
    87       $distToProcess_DB ++
    88       if ($distToProcess_DB >= $DB:n) set distToProcess_DB = 0
     97
     98      # only increment the database number after we have gone through all of
     99      # the stages
     100      if ($currentStage == 0)
     101          $distToProcess_DB ++
     102          if ($distToProcess_DB >= $DB:n) set distToProcess_DB = 0
     103      end
    89104    end
    90105    add_poll_args run
     
    134149    if ("$pageName" == "NULL") break
    135150
     151#    echo running $pageName
     152
    136153    book setword distToProcess $pageName pantaskState RUN
    137154    book getword distToProcess $pageName dist_id -var DIST_ID
    138155    book getword distToProcess $pageName camera -var CAMERA
    139     book getword distToProcess $pageName stage -var STAGE
    140     book getword distToProcess $pageName stage_id -var STAGE_ID
     156    book getword distToProcess $pageName stage -var DIST_STAGE
     157    book getword distToProcess $pageName stage_id -var DIST_STAGE_ID
    141158    book getword distToProcess $pageName clean -var CLEAN
    142159    book getword distToProcess $pageName component -var COMPONENT
     
    159176        $EXTRA_ARGS = $EXTRA_ARGS --magicked
    160177    end
    161     # no_magic is output as integer due to the union in the sql
    162     if ($NO_MAGIC)
     178    # is this right for stack and fake?
     179    if ("$NO_MAGIC" == "T")
    163180        $EXTRA_ARGS = $EXTRA_ARGS --no_magic
    164181    end
     
    170187#    set.workdir.by.camera $CAMERA $MAGIC_ID $WORKDIR_TEMPLATE $default_host WORKDIR
    171188#    host anyhost
    172 
    173189
    174190    substr $COMPONENT 0 3 COMP_HEAD
     
    180196    end
    181197
    182 
    183198    sprintf logfile "%s/dist.%s.%s.log" $OUTDIR $DIST_ID $COMPONENT
    184     stdout $logfile
    185     stderr $logfile
    186 
    187     $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
     199#    stdout $logfile
     200#    stderr $logfile
     201
     202    $run = dist_component.pl --dist_id $DIST_ID --camera $CAMERA --stage $DIST_STAGE --stage_id $DIST_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
    188203
    189204    add_standard_args run
     
    211226end
    212227
    213 
    214228task           dist.advance.load
    215229  host         local
     
    220234  npending     1
    221235
    222   stdout NULL
    223   stderr $LOGDIR/dist.advance.load.log
    224 
    225236  task.exec
     237  #  stderr $LOGSUBDIR/dist.advance.load.log
     238
    226239    $run = disttool -toadvance
    227240    if ($DB:n == 0)
     
    261274  end
    262275end
     276
    263277
    264278task           dist.advance.run
     
    291305
    292306    sprintf logfile "%s/dist.advance.%s.log" $OUTDIR $DIST_ID
    293     stdout $logfile
    294     stderr $logfile
     307#    stdout $logfile
     308#    stderr $logfile
    295309
    296310    $run = dist_advancerun.pl --dist_id $DIST_ID --stage $STAGE --stage_id $STAGE_ID --outdir $OUTDIR $EXTRA_ARGS --logfile $logfile
     
    318332  end
    319333end
    320 
    321 task           dist.queueruns
    322 #  host         local
    323 
    324   periods      -poll $RUNPOLL
    325   periods      -exec 30
    326   periods      -timeout 45
    327   npending     1
    328 
    329   active false
    330 
    331 #  stdout $LOGDIR/dist.queuruns
    332 #  stderr $LOGDIR/dist.queueruns
    333 
    334   task.exec
    335     $MYARGS = ""
    336     # assume that we need magic unless we are running simtest
    337     if ($?SIMTEST_CAMERA != 0)
    338         $MYARGS = --no_magic
    339     end
    340 
    341     $run = dist_queue_runs.pl $MYARGS --stage_limit 16 --logfile $LOGDIR/dist.queueruns
    342 
    343     if ($DB:n == 0)
    344        $DBNAME = DEFAULT
    345     else
    346       # save the DB name for add_standard_args
    347       $DBNAME =  $DB:$distQueue_DB
    348       $distQueue_DB ++
    349       if ($distQueue_DB >= $DB:n) set distQueue_DB = 0
    350     end
    351 
    352     host anyhost
    353 
    354     add_standard_args run
    355 
    356     # create the command line
    357     if ($VERBOSE > 1)
    358       echo command $run
    359     end
    360     command $run
    361   end
    362 
    363   task.exit     $EXIT_SUCCESS
    364     # nothing to do
    365   end
    366 
    367   # default exit status
    368   task.exit    default
    369     showcommand failure
    370   end
    371 
    372   # operation timed out?
    373   task.exit    timeout
    374     showcommand timeout
    375   end
    376 
    377   # operation timed out?
    378   task.exit    crash
    379     showcommand crash
    380   end
    381 end
  • branches/eam_branches/20090715/ippTasks/ipphosts.mhpcc.config

    r25402 r25625  
    33ipphosts METADATA
    44  camera STR skycell
    5   count S32  12
    6   sky00 STR  ipp024
    7   sky01 STR  ipp023
    8   sky02 STR  ipp026
    9   sky03 STR  ipp028
    10   sky04 STR  ipp029
    11   sky05 STR  ipp030
    12   sky06 STR  ipp031
    13   sky07 STR  ipp032
    14   sky08 STR  ipp033
    15   sky09 STR  ipp034
    16   sky10 STR  ipp035
    17   sky11 STR  ipp036
    18 END
    19 
    20 ipphosts METADATA
    21   camera STR MEGACAM
    22   ccd00 STR po00
    23   ccd01 STR po01
    24   ccd02 STR po02
    25   ccd03 STR po03
    26   ccd04 STR po04
    27   ccd05 STR po05
    28   ccd06 STR po06
    29   ccd07 STR po07
    30   ccd08 STR po08
    31   ccd09 STR po09
    32 END
    33 
    34 ipphosts METADATA
    35   camera STR CFH12K
    36   ccd00 STR po10
    37   ccd01 STR po11
    38   ccd02 STR po12
     5  count S32  46
     6  sky00 STR  ipp006
     7  sky01 STR  ipp007
     8  sky02 STR  ipp008
     9  sky03 STR  ipp009
     10  sky04 STR  ipp010
     11  sky05 STR  ipp011
     12  sky06 STR  ipp012
     13  sky07 STR  ipp013
     14  sky08 STR  ipp014
     15  sky09 STR  ipp015
     16  sky10 STR  ipp016
     17  sky11 STR  ipp017
     18  sky12 STR  ipp018
     19  sky13 STR  ipp019
     20  sky14 STR  ipp020
     21  sky15 STR  ipp021
     22  sky16 STR  ipp023
     23  sky17 STR  ipp024
     24  sky18 STR  ipp025
     25  sky19 STR  ipp026
     26  sky20 STR  ipp027
     27  sky21 STR  ipp028
     28  sky22 STR  ipp029
     29  sky23 STR  ipp030
     30  sky24 STR  ipp031
     31  sky25 STR  ipp032
     32  sky26 STR  ipp033
     33  sky27 STR  ipp034
     34  sky28 STR  ipp035
     35  sky29 STR  ipp036
     36  sky30 STR  ipp038
     37  sky31 STR  ipp039
     38  sky32 STR  ipp040
     39  sky33 STR  ipp041
     40  sky34 STR  ipp042
     41  sky35 STR  ipp043
     42  sky36 STR  ipp044
     43  sky37 STR  ipp045
     44  sky38 STR  ipp046
     45  sky39 STR  ipp047
     46  sky40 STR  ipp048
     47  sky41 STR  ipp049
     48  sky42 STR  ipp050
     49  sky43 STR  ipp051
     50  sky44 STR  ipp052
     51  sky45 STR  ipp053
    3952END
    4053
  • branches/eam_branches/20090715/ippTasks/magic.pro

    r25402 r25625  
    1010book init magicToTree
    1111book init magicToProcess
    12 book init magicToDS
    13 book init magicDSToRevert
    1412
    1513### Database lists
    1614$magicToTree_DB = 0
    1715$magicToProcess_DB = 0
    18 $magicToDS_DB = 0
    19 $magicDSToRevert_DB = 0
    20 
    21 #list of stages
    22 $STAGE:n = 0
    23 list STAGE -add "raw"
    24 list STAGE -add "chip"
    25 list STAGE -add "camera"
    26 list STAGE -add "warp"
    27 list STAGE -add "diff"
    28 $magicDSRevertStage = 0
    2916
    3017### Check status of tasks
     
    3219  book listbook magicToTree
    3320  book listbook magicToProcess
    34   book listbook magicToDS
    35   book listbook magicDSToRevert
    3621end
    3722
     
    4025  book init magicToTree
    4126  book init magicToProcess
    42   book init magicToDS
    43   book init magicDSToRevert
    4427end
    4528
     
    5841    active true
    5942  end
    60   task magic.destreak.load
    61     active true
    62   end
    63   task magic.destreak.run
    64     active true
    65   end
    66 end
    67 
    68 macro magic.ds.revert.on
    69     task magic.ds.revert.load
    70         active true
    71     end
    72     task magic.ds.revert.run
    73         active true
    74     end
    75 end
     43end
     44
    7645### Turn tasks off
    7746macro magic.off
     
    8857    active false
    8958  end
    90   task magic.destreak.load
    91     active false
    92   end
    93   task magic.destreak.run
    94     active false
    95   end
    96 end
    97 
    98 macro magic.ds.revert.off
    99     task magic.ds.revert.load
    100         active false
    101     end
    102     task magic.ds.revert.run
    103         active false
    104     end
    105 end
    106 macro magic.ds.off
    107     task magic.destreak.load
    108         active false
    109     end
    110     task magic.destreak.run
    111         active false
    112     end
    113 end
    114 macro magic.ds.on
    115     task magic.destreak.load
    116         active true
    117     end
    118     task magic.destreak.run
    119         active true
    120     end
    121 end
    122 
    123 macro magic.ds.status
    124     echo magicToDS
    125     book listbook magicToDS
    126     echo ""
    127     echo magicDSToRevert
    128     book listbook magicDSToRevert
    129 end
    130 
    131 
     59end
    13260
    13361task           magic.tree.load
     
    400328  end
    401329end
    402 
    403 task           magic.destreak.load
    404   host         local
    405 
    406   periods      -poll $LOADPOLL
    407   # this query can take a long time
    408   periods      -exec 10
    409   periods      -timeout 120
    410   npending     1
    411 
    412   stdout NULL
    413   stderr $LOGDIR/magic.destreak.log
    414 
    415   task.exec
    416     $run = magicdstool -todestreak -limit 120
    417     if ($DB:n == 0)
    418       option DEFAULT
    419     else
    420       # save the DB name for the exit tasks
    421       option $DB:$magicToDS_DB
    422       $run = $run -dbname $DB:$magicToDS_DB
    423       $magicToDS_DB ++
    424       if ($magicToDS_DB >= $DB:n) set magicToDS_DB = 0
    425     end
    426     add_poll_args run
    427     add_poll_labels run
    428     command $run
    429   end
    430 
    431   # success
    432   task.exit    0
    433     # convert 'stdout' to book format
    434     ipptool2book stdout magicToDS -key magic_ds_id:component -uniq -setword dbname $options:0 -setword pantaskState INIT
    435     if ($VERBOSE > 2)
    436       book listbook magicToDS
    437     end
    438 
    439     # delete existing entries in the appropriate pantaskStates
    440     process_cleanup magicToDS
    441   end
    442 
    443   # locked list
    444   task.exit    default
    445     showcommand failure
    446   end
    447 
    448   task.exit    crash
    449     showcommand crash
    450   end
    451 
    452   # operation times out?
    453   task.exit    timeout
    454     showcommand timeout
    455   end
    456 end
    457 
    458 task           magic.destreak.run
    459   periods      -poll $RUNPOLL
    460   periods      -exec $RUNEXEC
    461   periods      -timeout 60
    462 
    463   task.exec
    464     book npages magicToDS -var N
    465     if ($N == 0) break
    466     if ($NETWORK == 0) break
    467    
    468     # look for new images (pantaskState == INIT)
    469     book getpage magicToDS 0 -var pageName -key pantaskState INIT
    470     if ("$pageName" == "NULL") break
    471 
    472     book setword magicToDS $pageName pantaskState RUN
    473     book getword magicToDS $pageName exp_id -var EXP_ID
    474     book getword magicToDS $pageName magic_ds_id -var MAGIC_DS_ID
    475     book getword magicToDS $pageName camera -var CAMERA
    476     book getword magicToDS $pageName streaks_uri -var STREAKS
    477     book getword magicToDS $pageName inv_streaks_uri -var INV_STREAKS
    478     book getword magicToDS $pageName stage -var STAGE
    479     book getword magicToDS $pageName stage_id -var STAGE_ID
    480     book getword magicToDS $pageName component -var COMPONENT
    481     book getword magicToDS $pageName uri -var URI
    482     book getword magicToDS $pageName path_base -var PATH_BASE
    483     book getword magicToDS $pageName cam_path_base -var CAM_PATH_BASE
    484     book getword magicToDS $pageName outroot -var OUTROOT
    485     book getword magicToDS $pageName recoveryroot -var RECROOT
    486     book getword magicToDS $pageName re_place -var REPLACE
    487     book getword magicToDS $pageName dbname -var DBNAME
    488 
    489     sprintf logfile "%s/%s.mds.%s.%s.%s.log" $OUTROOT $EXP_ID $MAGIC_DS_ID $STAGE_ID $COMPONENT
    490 
    491     substr $COMPONENT 0 3 COMP_HEAD
    492     if ("$COMP_HEAD" == "sky")
    493         set.host.for.skycell $COMPONENT
    494     else
    495         # assume component is a class_id, if not we will default to anyhost
    496         set.host.for.camera $CAMERA $COMPONENT
    497     end
    498 
    499     # TODO: do not add recoveryroot or replace if they are null or zero
    500 
    501     $run = magic_destreak.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --streaks $STREAKS --inv_streaks $INV_STREAKS --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --uri $URI --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --outroot $OUTROOT --logfile $logfile --recoveryroot $RECROOT --replace $REPLACE
    502 
    503     add_standard_args run
    504 
    505     # save the pageName for future reference below
    506     options $pageName
    507 
    508     # create the command line
    509     if ($VERBOSE > 1)
    510       echo command $run
    511     end
    512     command $run
    513   end
    514 
    515   # default exit status
    516   task.exit    0
    517     process_exit magicToDS $options:0 $JOB_STATUS
    518    end
    519 
    520   # locked list
    521   task.exit    default
    522     showcommand failure
    523     process_exit magicToDS $options:0 $JOB_STATUS
    524   end
    525 
    526   task.exit    crash
    527     showcommand crash
    528     book setword magicToDS $options:0 pantaskState CRASH
    529   end
    530 
    531   # operation timed out?
    532   task.exit    timeout
    533     showcommand timeout
    534     book setword magicToDS $options:0 pantaskState TIMEOUT
    535   end
    536 end
    537 
    538 task           magic.ds.revert.load
    539   host         local
    540 
    541   periods      -poll $LOADPOLL
    542   periods      -exec $LOADEXEC
    543   periods      -timeout 20
    544   npending     1
    545   active       false
    546 
    547   stdout NULL
    548   stderr $LOGDIR/magic.ds.revert.log
    549 
    550   task.exec
    551     $run = magicdstool -torevert -stage $STAGE:$magicDSRevertStage
    552     $magicDSRevertStage ++
    553     if ($magicDSRevertStage >= $STAGE:n) set magicDSRevertStage = 0
    554 
    555     if ($DB:n == 0)
    556       option DEFAULT
    557     else
    558 
    559       # save the DB name for the exit tasks
    560       option $DB:$magicDSToRevert_DB
    561       $run = $run -dbname $DB:$magicDSToRevert_DB
    562 
    563       # only bump database number after we have gone through all of the stages
    564       if ($magicDSRevertStage == 0)
    565              $magicDSToRevert_DB ++
    566       end
    567       if ($magicDSToRevert_DB >= $DB:n) set magicDSToRevert_DB = 0
    568     end
    569     add_poll_args run
    570     add_poll_labels run
    571     command $run
    572   end
    573 
    574   # success
    575   task.exit    0
    576     # convert 'stdout' to book format
    577     ipptool2book stdout magicDSToRevert -key magic_ds_id:component -uniq -setword dbname $options:0 -setword pantaskState INIT
    578     if ($VERBOSE > 2)
    579       book listbook magicDSToRevert
    580     end
    581 
    582     # delete existing entries in the appropriate pantaskStates
    583     process_cleanup magicDSToRevert
    584   end
    585 
    586   # locked list
    587   task.exit    default
    588     showcommand failure
    589   end
    590 
    591   task.exit    crash
    592     showcommand crash
    593   end
    594 
    595   # operation times out?
    596   task.exit    timeout
    597     showcommand timeout
    598   end
    599 end
    600 
    601 task           magic.ds.revert.run
    602   periods      -poll $RUNPOLL
    603   periods      -exec $RUNEXEC
    604   periods      -timeout 60
    605   active       false
    606 
    607   task.exec
    608     book npages magicDSToRevert -var N
    609     if ($N == 0) break
    610     if ($NETWORK == 0) break
    611    
    612     # look for new images (pantaskState == INIT)
    613     book getpage magicDSToRevert 0 -var pageName -key pantaskState INIT
    614     if ("$pageName" == "NULL") break
    615 
    616     book setword magicDSToRevert $pageName pantaskState RUN
    617     book getword magicDSToRevert $pageName exp_id -var EXP_ID
    618     book getword magicDSToRevert $pageName magic_ds_id -var MAGIC_DS_ID
    619     book getword magicDSToRevert $pageName camera -var CAMERA
    620     book getword magicDSToRevert $pageName stage -var STAGE
    621     book getword magicDSToRevert $pageName stage_id -var STAGE_ID
    622     book getword magicDSToRevert $pageName component -var COMPONENT
    623     book getword magicDSToRevert $pageName path_base -var PATH_BASE
    624     book getword magicDSToRevert $pageName cam_path_base -var CAM_PATH_BASE
    625     book getword magicDSToRevert $pageName outroot -var OUTROOT
    626     book getword magciDSToRevert $pageName bytes -var BYTES
    627     book getword magciDSToRevert $pageName md5sum -var md5sum
    628 #    book getword magicDSToRevert $pageName recoveryroot -var RECROOT
    629     book getword magicDSToRevert $pageName re_place -var REPLACE
    630     book getword magicDSToRevert $pageName dbname -var DBNAME
    631 
    632     sprintf logfile "%s/%s.mds.revert.%s.%s.%s.log" $OUTROOT $EXP_ID $MAGIC_DS_ID $STAGE_ID $COMPONENT
    633 
    634     substr $COMPONENT 0 3 COMP_HEAD
    635     if ("$COMP_HEAD" == "sky")
    636         set.host.for.skycell $COMPONENT
    637     else
    638         # assume component is a class_id, if not we will default to anyhost
    639         set.host.for.camera $CAMERA $COMPONENT
    640     end
    641 
    642     $run = magic_destreak_revert.pl --magic_ds_id $MAGIC_DS_ID --camera $CAMERA --stage $STAGE --stage_id $STAGE_ID --component $COMPONENT --path_base $PATH_BASE --cam_path_base $CAM_PATH_BASE --outroot $OUTROOT --logfile $logfile --replace $REPLACE
    643 
    644     add_standard_args run
    645 
    646     # save the pageName for future reference below
    647     options $pageName
    648 
    649     # create the command line
    650     if ($VERBOSE > 1)
    651       echo command $run
    652     end
    653     command $run
    654   end
    655 
    656   # default exit status
    657   task.exit    0
    658     process_exit magicDSToRevert $options:0 $JOB_STATUS
    659    end
    660 
    661   # locked list
    662   task.exit    default
    663     showcommand failure
    664     process_exit magicDSToRevert $options:0 $JOB_STATUS
    665   end
    666 
    667   task.exit    crash
    668     showcommand crash
    669     book setword magicDSToRevert $options:0 pantaskState CRASH
    670   end
    671 
    672   # operation timed out?
    673   task.exit    timeout
    674     showcommand timeout
    675     book setword magicDSToRevert $options:0 pantaskState TIMEOUT
    676   end
    677 end
    678 
  • branches/eam_branches/20090715/ippTasks/pantasks.pro

    r25402 r25625  
    3232
    3333# very basic values: set these with init.copy.mhpcc
    34 $default_host     = anyhost
     34$default_host     = any
    3535$workdir_template = `pwd`
    3636
  • branches/eam_branches/20090715/ippTasks/pstamp.pro

    r25402 r25625  
    1 
    2 #$VERBOSE = 3
     1# pstamp.pro : Postage Stamp Server tasks
     2
     3check.globals
     4
     5$LOGSUBDIR = $LOGDIR/pstamp
     6mkdir $LOGSUBDIR
    37
    48# these variables wil cycle through the known database names
     
    812$pstampJob_DB = 0
    913$pstampFin_DB = 0
     14$pstampRev_DB = 0
    1015
    1116# set PS_DBSERVER if postage stamp database host is not the same as the value for DBSERVER in site.config
     
    5257        active true
    5358    end
    54 end
     59    task pstamp.job.revert
     60        active true
     61    end
     62end
     63
    5564
    5665macro pstamp.off
     
    7584    end
    7685    task pstamp.job.run
     86        active false
     87    end
     88    task pstamp.job.revert
     89        active false
     90    end
     91end
     92
     93macro pstamp.revert.on
     94    task pstamp.job.revert
     95        active true
     96    end
     97end
     98macro pstamp.revert.off
     99    task pstamp.job.revert
    77100        active false
    78101    end
     
    88111
    89112    task.exec
     113        stdout $LOGSUBDIR/pstamp.request.find.log
     114        stderr $LOGSUBDIR/pstamp.request.find.log
    90115        if ($DB:n == 0)
    91116            option DEFAULT
     
    125150
    126151    task.exec
     152        stdout $LOGSUBDIR/pstamp.request.load.log
     153        stderr $LOGSUBDIR/pstamp.request.load.log
    127154        $run = pstamptool -pendingreq
    128155        if ($DB:n == 0)
     
    168195
    169196    task.exec
     197        stdout $LOGSUBDIR/pstamp.request.run.log
     198        stderr $LOGSUBDIR/pstamp.request.run.log
    170199        book npages pstampRequest -var N
    171200        if ($N == 0) break
     
    223252
    224253    task.exec
     254        stdout $LOGSUBDIR/pstamp.finish.load.log
     255        stderr $LOGSUBDIR/pstamp.finish.load.log
    225256        $run = pstamptool  -completedreq
    226257        if ($DB:n == 0)
     
    265296
    266297    task.exec
     298        stdout $LOGSUBDIR/request.finish.run.log
     299        stderr $LOGSUBDIR/request.finish.run.log
    267300        book npages pstampFinish -var N
    268301        if ($N == 0) break
     
    320353
    321354    task.exec
     355        stdout $LOGSUBDIR/pstamp.job.load.log
     356        stderr $LOGSUBDIR/pstamp.job.load.log
    322357        $run = pstamptool -pendingjob
    323358        if ($DB:n == 0)
     
    346381    end
    347382
     383    task.exit   crash
     384        showcommand crash
     385    end
     386
     387    task.exit   timeout
     388        showcommand timeout
     389    end
     390
    348391    task.exit   default
    349392        showcommand failure
    350393    end
    351394
    352     task.exit   crash
    353         showcommand crash
    354     end
    355 
    356     task.exit   timeout
    357         showcommand timeout
    358     end
    359395end
    360396
     
    365401
    366402    task.exec
     403        stdout $LOGSUBDIR/pstamp.job.run.log
     404        stderr $LOGSUBDIR/pstamp.job.run.log
    367405        book npages pstampJob -var N
    368406        if ($N == 0)
     
    430468    end
    431469end
     470
     471task pstamp.job.revert
     472    host        local
     473
     474    periods     -poll $LOADPOLL
     475    periods     -exec 10
     476    periods     -timeout 300
     477    npending    1
     478
     479    task.exec
     480        stdout $LOGSUBDIR/pstamp.job.revert.log
     481        stderr $LOGSUBDIR/pstamp.job.revert.log
     482        $run = pstamptool -revertjob -all
     483        if ($DB:n == 0)
     484            option DEFAULT
     485        else
     486            $run = $run $PS_DBSERVER -dbname $DB:$pstampRev_DB
     487            $pstampRev_DB ++
     488            if ($pstampRev_DB >= $DB:n) set pstampRev_DB = 0
     489        end
     490        add_poll_args run
     491        # add_poll_labels run
     492        command $run
     493    end
     494
     495    task.exit $EXIT_SUCCESS
     496        # nothing to do
     497    end
     498
     499    task.exit   default
     500        showcommand failure
     501    end
     502
     503    task.exit   crash
     504        showcommand crash
     505    end
     506
     507    task.exit   timeout
     508        showcommand timeout
     509    end
     510end
     511
  • branches/eam_branches/20090715/ippTasks/rcserver.pro

    r25022 r25625  
    44check.globals
    55
    6 #$LOGSUBDIR = $LOGDIR/rcserver
     6$LOGSUBDIR = $LOGDIR/rcserver
    77mkdir $LOGSUBDIR
    88
     
    6666
    6767  stdout NULL
    68   stderr $LOGDIR/rcserver.makefileset.load.log
     68  stderr $LOGSUBDIR/rcserver.makefileset.load.log
    6969
    7070  task.exec
     
    8686  task.exit    0
    8787    # convert 'stdout' to book format
    88     ipptool2book stdout rcPendingFS -key dist_id:prod_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     88    ipptool2book stdout rcPendingFS -key dist_id:dest_id -uniq -setword dbname $options:0 -setword pantaskState INIT
    8989    if ($VERBOSE > 2)
    9090      book listbook rcPendingFS
     
    131131    book getword rcPendingFS $pageName dist_dir -var DIST_DIR
    132132#    book getword rcPendingFS $pageName clean -var CLEAN
    133     book getword rcPendingFS $pageName prod_id -var PROD_ID
     133    book getword rcPendingFS $pageName dest_id -var DEST_ID
    134134    book getword rcPendingFS $pageName product_name -var PRODUCT_NAME
    135135    book getword rcPendingFS $pageName ds_dbhost -var DS_DBHOST
     
    141141    host anyhost
    142142
    143     sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $PROD_ID
     143    sprintf logfile "%s/makefs.%s.%s.log" $DIST_DIR $DIST_ID $DEST_ID
    144144    stdout $logfile
    145145    stderr $logfile
     
    147147    book setword rcPendingFS $pageName pantaskState RUN
    148148
    149     $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --prod_id $PROD_ID --product_name $PRODUCT_NAME  --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR
     149    $run = dist_make_fileset.pl --dist_id $DIST_ID --target_id $TARGET_ID --stage $STAGE --stage_id $STAGE_ID --dest_id $DEST_ID --product_name $PRODUCT_NAME  --ds_dbhost $DS_DBHOST --ds_dbname $DS_DBNAME --dist_dir $DIST_DIR
    150150
    151151    add_standard_args run
     
    184184
    185185  stdout NULL
    186   stderr $LOGDIR/rcserver.checkstatus.load.log
     186  stderr $LOGSUBDIR/rcserver.checkstatus.load.log
    187187
    188188  task.exec
     
    241241
    242242    stdout NULL
    243     stderr $LOGDIR/rcserver.checkstatus.run.log
     243    stderr $LOGSUBDIR/rcserver.checkstatus.run.log
    244244
    245245    book setword rcPendingDest $pageName pantaskState RUN
    246246    book getword rcPendingDest $pageName dest_id -var DEST_ID
    247     book getword rcPendingDest $pageName prod_id -var PROD_ID
     247    book getword rcPendingDest $pageName dest_id -var DEST_ID
    248248    book getword rcPendingDest $pageName status_uri -var STATUS_URI
    249249    book getword rcPendingDest $pageName last_fileset -var LAST_FILESET
     
    252252    host anyhost
    253253
    254     $run = rcserver_checkstatus.pl --dest_id $DEST_ID --prod_id $PROD_ID --status_uri $STATUS_URI --last_fileset $LAST_FILESET
     254    $run = rcserver_checkstatus.pl --dest_id $DEST_ID --dest_id $DEST_ID --status_uri $STATUS_URI --last_fileset $LAST_FILESET
    255255    add_standard_args run
    256256
  • branches/eam_branches/20090715/ippTasks/register.pro

    r24055 r25625  
    217217    book getword regPendingImfile $pageName tmp_class_id -var TMP_CLASS_ID
    218218    book getword regPendingImfile $pageName uri          -var URI
     219    book getword regPendingImfile $pageName bytes        -var BYTES
     220    book getword regPendingImfile $pageName md5sum       -var MD5SUM
    219221    book getword regPendingImfile $pageName workdir      -var WORKDIR_TEMPLATE
    220222    book getword regPendingImfile $pageName dbname       -var DBNAME
     
    244246
    245247    # XXX register_imfile.pl differs from the standard script : it does not have an 'outroot' argument, and it does not take '--redirect'
    246     $run = register_imfile.pl --exp_id $EXP_ID --tmp_class_id $TMP_CLASS_ID --tmp_exp_name $TMP_EXP_NAME --uri $URI --logfile $logfile
     248    $run = register_imfile.pl --exp_id $EXP_ID --tmp_class_id $TMP_CLASS_ID --tmp_exp_name $TMP_EXP_NAME --uri $URI --logfile $logfile --bytes $BYTES --md5sum $MD5SUM
    247249    add_standard_args run
    248250
  • branches/eam_branches/20090715/ippTasks/site.mhpcc.pro

    r25402 r25625  
    6666 if ("$1" == "on")
    6767  $NEBULOUS = 1
    68   $default_host     = ipp023
     68  $default_host     = any
    6969  $workdir_template = neb://@HOST@.0
    7070 else
Note: See TracChangeset for help on using the changeset viewer.