Changeset 28334 for branches/czw_branch/20100519/ippTasks/stack.pro
- Timestamp:
- Jun 15, 2010, 11:22:56 AM (16 years ago)
- Location:
- branches/czw_branch/20100519
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/stack.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20100519
- Property svn:mergeinfo changed
/trunk merged: 28280-28298,28300-28302,28305-28307
- Property svn:mergeinfo changed
-
branches/czw_branch/20100519/ippTasks/stack.pro
r28304 r28334 10 10 ### Initialise the books containing the tasks to do 11 11 book init stackSumSkyfile 12 book init stackPendingSummary 12 13 #book init stackCleanup 13 14 … … 16 17 $stack_revert_DB = 0 17 18 #$stackCleanup_DB = 0 19 $stackSummary_DB = 0 18 20 19 21 ### Check status of stacking tasks … … 26 28 macro stack.reset 27 29 book init stackSumSkyfile 30 book init stackPendingSummary 28 31 # book init stackCleanup 29 32 end … … 40 43 active false 41 44 end 45 task stack.summary.load 46 active true 47 end 48 task stack.summary.run 49 active true 50 end 42 51 end 43 52 … … 51 60 end 52 61 task stack.revert 62 active false 63 end 64 task stack.summary.load 65 active false 66 end 67 task stack.summary.run 53 68 active false 54 69 end … … 403 418 end 404 419 420 ### Load tasks for doing the stack summary 421 ### Tasks are loaded into stackPendingSummary 422 task stack.summary.load 423 host local 424 425 periods -poll $LOADPOLL 426 periods -exec $LOADEXEC 427 periods -timeout 1200 428 npending 1 429 430 stdout NULL 431 stderr $LOGDIR/stack.summary.load 432 433 task.exec 434 if ($LABEL:n == 0) break 435 $run = stacktool -tosummary 436 if ($DB:n == 0) 437 option DEFAULT 438 else 439 # save the DB name for the exit tasks 440 option $DB:$stackSummary_DB 441 $run = $run -dbname $DB:$stackSummary_DB 442 $stackSummary_DB ++ 443 if ($stackSummary_DB >= $DB:n) set stackSummary_DB = 0 444 end 445 add_poll_args run 446 add_poll_labels run 447 command $run 448 end 449 450 # success 451 task.exit 0 452 # convert 'stdout' to book format 453 ipptool2book stdout stackPendingSummary -key sass_id -uniq -setword dbname $options:0 -setword pantaskState INIT 454 if ($VERBOSE > 2) 455 book listbook stackPendingSummary 456 end 457 458 # delete existing entries in the appropriate pantaskStates 459 process_cleanup stackPendingSummary 460 end 461 462 # locked list 463 task.exit default 464 showcommand failure 465 end 466 467 task.exit crash 468 showcommand crash 469 end 470 471 # operation times out? 472 task.exit timeout 473 showcommand timeout 474 end 475 end 476 477 ### Run tasks for doing the stack summary 478 task stack.summary.run 479 periods -poll $RUNPOLL 480 periods -exec $RUNEXEC 481 periods -timeout 60 482 483 task.exec 484 # if we are unable to run the 'exec', use a long retry time 485 periods -exec $RUNEXEC 486 487 book npages stackPendingSummary -var N 488 if ($N == 0) break 489 if ($NETWORK == 0) break 490 491 # look for new images in stackPendingSummary (pantaskState == INIT) 492 book getpage stackPendingSummary 0 -var pageName -key pantaskState INIT 493 if ("$pageName" == "NULL") break 494 495 book setword stackPendingSummary $pageName pantaskState RUN 496 book getword stackPendingSummary $pageName sass_id -var SASS_ID 497 book getword stackPendingSummary $pageName camera -var CAMERA 498 book getword stackPendingSummary $pageName workdir -var WORKDIR_TEMPLATE 499 book getword stackPendingSummary $pageName dbname -var DBNAME 500 book getword stackPendingSummary $pageName tess_id -var TESS_DIR 501 book getword stackPendingSummary $pageName state -var RUN_STATE 502 book getword stackPendingSummary $pageName projection_cell -var projection_cell 503 504 # set the host and workdir 505 host anyhost 506 strsub $WORKDIR_TEMPLATE @HOST@.0 $default_host -var WORKDIR 507 508 basename $TESS_DIR -var TESS_ID 509 510 ## generate outroot specific to this association 511 sprintf outroot "%s/%s/%s.stk.%s.summary" $WORKDIR $TESS_ID $TESS_ID $SASS_ID 512 513 stdout $LOGDIR/stack.summary.log 514 stderr $LOGDIR/stack.summary.log 515 516 $run = skycell_jpeg.pl --stage stack --stage_id $SASS_ID --camera $CAMERA --outroot $outroot 517 add_standard_args run 518 519 # save the pageName for future reference below 520 options $pageName 521 522 # create the command line 523 if ($VERBOSE > 1) 524 echo command $run 525 end 526 periods -exec 0.05 527 command $run 528 end 529 530 # default exit status 531 task.exit default 532 process_exit stackPendingSummary $options:0 $JOB_STATUS 533 end 534 535 # locked list 536 task.exit crash 537 showcommand crash 538 echo "hostname: $JOB_HOSTNAME" 539 book setword stackPendingSummary $options:0 pantaskState CRASH 540 end 541 542 # operation timed out? 543 task.exit timeout 544 showcommand timeout 545 book setword stackPendingSummary $options:0 pantaskState TIMEOUT 546 end 547 end 548
Note:
See TracChangeset
for help on using the changeset viewer.
