Changeset 23480 for trunk/ippTasks/detrend.process.pro
- Timestamp:
- Mar 20, 2009, 6:08:06 PM (17 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/detrend.process.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/detrend.process.pro
r23230 r23480 8 8 book init detPendingProcessedImfile 9 9 book init detPendingProcessedExp 10 book init detCleanupProcessedImfile11 book init detCleanupProcessedExp12 10 13 11 macro detproc.reset 14 12 book init detPendingProcessedImfile 15 13 book init detPendingProcessedExp 16 book init detCleanupProcessedImfile17 book init detCleanupProcessedExp18 14 end 19 15 … … 23 19 echo detPendingProcessedExp 24 20 book listbook detPendingProcessedExp 25 echo detCleanupProcessedImfile26 book listbook detCleanupProcessedImfile27 echo detCleanupProcessedExp28 book listbook detCleanupProcessedExp29 21 end 30 22 … … 42 34 active true 43 35 end 44 task detrend.cleanup.process.load45 active true46 end47 task detrend.cleanup.process.run48 active true49 end50 task detrend.cleanup.processexp.load51 active true52 end53 task detrend.cleanup.processexp.run54 active true55 end56 36 end 57 37 … … 69 49 active false 70 50 end 71 task detrend.cleanup.process.load72 active false73 end74 task detrend.cleanup.process.run75 active false76 end77 task detrend.cleanup.processexp.load78 active false79 end80 task detrend.cleanup.processexp.run81 active false82 end83 51 end 84 52 … … 87 55 $detPendingProcessedImfile_DB = 0 88 56 $detPendingProcessedExp_DB = 0 89 $detCleanupProcessedImfile_DB = 090 $detCleanupProcessedExp_DB = 091 57 92 58 # select images ready for copy … … 347 313 end 348 314 end 349 350 ######## cleanup process imfile ########351 task detrend.cleanup.process.load352 host local353 354 periods -poll $LOADPOLL355 periods -exec $LOADEXEC356 periods -timeout 30357 npending 1358 active true359 360 stdout NULL361 stderr $LOGDIR/detrend.cleanup.process.imfile.log362 363 task.exec364 $run = dettool -pendingcleanup_processedimfile365 if ($DB:n == 0)366 option DEFAULT367 else368 # save the DB name for the exit tasks369 option $DB:$detCleanupProcessedImfile_DB370 $run = $run -dbname $DB:$detCleanupProcessedImfile_DB371 $detCleanupProcessedImfile_DB ++372 if ($detCleanupProcessedImfile_DB >= $DB:n) set detCleanupProcessedImfile_DB = 0373 end374 add_poll_args run375 command $run376 end377 378 # success379 task.exit 0380 # convert 'stdout' to book format381 ipptool2book stdout detCleanupProcessedImfile -key det_id:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT382 if ($VERBOSE > 2)383 book listbook detCleanupProcessedImfile384 end385 386 # delete existing entries in the appropriate pantaskStates387 process_cleanup detCleanupProcessedImfile388 end389 390 # locked list391 task.exit default392 showcommand failure393 end394 395 task.exit crash396 showcommand crash397 end398 399 # operation times out?400 task.exit timeout401 showcommand timeout402 end403 end404 405 # run the ipp_cleanup.pl script on pending images406 task detrend.cleanup.process.run407 periods -poll $RUNPOLL408 periods -exec $RUNEXEC409 periods -timeout 60410 active true411 412 task.exec413 book npages detCleanupProcessedImfile -var N414 if ($N == 0) break415 if ($NETWORK == 0) break416 417 # look for new images in detCleanupProcessedImfile (pantaskState == INIT)418 book getpage detCleanupProcessedImfile 0 -var pageName -key pantaskState INIT419 if ("$pageName" == "NULL") break420 421 book setword detCleanupProcessedImfile $pageName pantaskState RUN422 book getword detCleanupProcessedImfile $pageName det_id -var DET_ID423 book getword detCleanupProcessedImfile $pageName exp_id -var EXP_ID424 book getword detCleanupProcessedImfile $pageName class_id -var CLASS_ID425 book getword detCleanupProcessedImfile $pageName camera -var CAMERA426 book getword detCleanupProcessedImfile $pageName state -var CLEANUP_MODE427 book getword detCleanupProcessedImfile $pageName dbname -var DBNAME428 429 # specify choice of local or remote host based on camera and chip (class_id)430 set.host.for.camera $CAMERA FPA431 432 stdout $LOGDIR/detrend.cleanup.process.imfile.log433 stderr $LOGDIR/detrend.cleanup.process.imfile.log434 435 # XXX is everything listed here needed?436 $run = ipp_cleanup.pl --stage detrend.process.imfile --stage_id $DET_ID --exp_id $EXP_ID --class_id $CLASS_ID --camera $CAMERA --mode $CLEANUP_MODE437 add_standard_args run438 439 # save the pageName for future reference below440 options $pageName441 442 # create the command line443 if ($VERBOSE > 1)444 echo command $run445 end446 command $run447 end448 449 # default exit status450 task.exit default451 process_exit detCleanupProcessedImfile $options:0 $JOB_STATUS452 end453 454 # locked list455 task.exit crash456 showcommand crash457 echo "hostname: $JOB_HOSTNAME"458 book setword detCleanupProcessedImfile $options:0 pantaskState CRASH459 end460 461 # operation timed out?462 task.exit timeout463 showcommand timeout464 book setword detCleanupProcessedImfile $options:0 pantaskState TIMEOUT465 end466 end467 468 469 ######## cleanup process exp ########470 task detrend.cleanup.processexp.load471 host local472 473 periods -poll $LOADPOLL474 periods -exec $LOADEXEC475 periods -timeout 30476 npending 1477 active true478 479 stdout NULL480 stderr $LOGDIR/detrend.cleanup.process.exp.log481 482 task.exec483 $run = dettool -pendingcleanup_processedexp484 if ($DB:n == 0)485 option DEFAULT486 else487 # save the DB name for the exit tasks488 option $DB:$detCleanupProcessedExp_DB489 $run = $run -dbname $DB:$detCleanupProcessedExp_DB490 $detCleanupProcessedExp_DB ++491 if ($detCleanupProcessedExp_DB >= $DB:n) set detCleanupProcessedExp_DB = 0492 end493 add_poll_args run494 command $run495 end496 497 # success498 task.exit 0499 # convert 'stdout' to book format500 ipptool2book stdout detCleanupProcessedExp -key det_id:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT501 if ($VERBOSE > 2)502 book listbook detCleanupProcessedExp503 end504 505 # delete existing entries in the appropriate pantaskStates506 process_cleanup detCleanupProcessedExp507 end508 509 # locked list510 task.exit default511 showcommand failure512 end513 514 task.exit crash515 showcommand crash516 end517 518 # operation times out?519 task.exit timeout520 showcommand timeout521 end522 end523 524 # run the ipp_cleanup.pl script on pending images525 task detrend.cleanup.processexp.run526 periods -poll $RUNPOLL527 periods -exec $RUNEXEC528 periods -timeout 60529 active true530 531 task.exec532 book npages detCleanupProcessedExp -var N533 if ($N == 0) break534 if ($NETWORK == 0) break535 536 # look for new images in detCleanupProcessedExp (pantaskState == INIT)537 book getpage detCleanupProcessedExp 0 -var pageName -key pantaskState INIT538 if ("$pageName" == "NULL") break539 540 book setword detCleanupProcessedExp $pageName pantaskState RUN541 book getword detCleanupProcessedExp $pageName det_id -var DET_ID542 book getword detCleanupProcessedExp $pageName exp_id -var EXP_ID543 book getword detCleanupProcessedExp $pageName camera -var CAMERA544 book getword detCleanupProcessedExp $pageName state -var CLEANUP_MODE545 book getword detCleanupProcessedExp $pageName dbname -var DBNAME546 547 # specify choice of local or remote host based on camera and chip (class_id)548 set.host.for.camera $CAMERA FPA549 550 stdout $LOGDIR/detrend.cleanup.process.exp.log551 stderr $LOGDIR/detrend.cleanup.process.exp.log552 553 # XXX is everything listed here needed?554 $run = ipp_cleanup.pl --stage detrend.process.exp --stage_id $DET_ID --exp_id $EXP_ID --camera $CAMERA --mode $CLEANUP_MODE555 add_standard_args run556 557 # save the pageName for future reference below558 options $pageName559 560 # create the command line561 if ($VERBOSE > 1)562 echo command $run563 end564 command $run565 end566 567 # default exit status568 task.exit default569 process_exit detCleanupProcessedExp $options:0 $JOB_STATUS570 end571 572 # locked list573 task.exit crash574 showcommand crash575 echo "hostname: $JOB_HOSTNAME"576 book setword detCleanupProcessedExp $options:0 pantaskState CRASH577 end578 579 # operation timed out?580 task.exit timeout581 showcommand timeout582 book setword detCleanupProcessedExp $options:0 pantaskState TIMEOUT583 end584 end
Note:
See TracChangeset
for help on using the changeset viewer.
