Changeset 28375 for trunk/ippTasks/stack.pro
- Timestamp:
- Jun 16, 2010, 5:30:27 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/stack.pro (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/czw_branch/20100519 (added) merged: 28044-28045,28164,28245,28304,28334,28338
- Property svn:mergeinfo changed
-
trunk/ippTasks/stack.pro
r27929 r28375 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 … … 349 364 # end 350 365 366 367 368 351 369 task stack.revert 352 370 host local … … 400 418 end 401 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 trange 07:00:00 08:00:00 -nmax 1 429 npending 1 430 431 stdout NULL 432 stderr $LOGDIR/stack.summary.load 433 434 task.exec 435 if ($LABEL:n == 0) break 436 $run = stacktool -tosummary 437 if ($DB:n == 0) 438 option DEFAULT 439 else 440 # save the DB name for the exit tasks 441 option $DB:$stackSummary_DB 442 $run = $run -dbname $DB:$stackSummary_DB 443 $stackSummary_DB ++ 444 if ($stackSummary_DB >= $DB:n) set stackSummary_DB = 0 445 end 446 add_poll_args run 447 add_poll_labels run 448 command $run 449 end 450 451 # success 452 task.exit 0 453 # convert 'stdout' to book format 454 ipptool2book stdout stackPendingSummary -key sass_id -uniq -setword dbname $options:0 -setword pantaskState INIT 455 if ($VERBOSE > 2) 456 book listbook stackPendingSummary 457 end 458 459 # delete existing entries in the appropriate pantaskStates 460 process_cleanup stackPendingSummary 461 end 462 463 # locked list 464 task.exit default 465 showcommand failure 466 end 467 468 task.exit crash 469 showcommand crash 470 end 471 472 # operation times out? 473 task.exit timeout 474 showcommand timeout 475 end 476 end 477 478 ### Run tasks for doing the stack summary 479 task stack.summary.run 480 periods -poll $RUNPOLL 481 periods -exec $RUNEXEC 482 periods -timeout 60 483 484 task.exec 485 # if we are unable to run the 'exec', use a long retry time 486 periods -exec $RUNEXEC 487 488 book npages stackPendingSummary -var N 489 if ($N == 0) break 490 if ($NETWORK == 0) break 491 492 # look for new images in stackPendingSummary (pantaskState == INIT) 493 book getpage stackPendingSummary 0 -var pageName -key pantaskState INIT 494 if ("$pageName" == "NULL") break 495 496 book setword stackPendingSummary $pageName pantaskState RUN 497 book getword stackPendingSummary $pageName sass_id -var SASS_ID 498 book getword stackPendingSummary $pageName camera -var CAMERA 499 book getword stackPendingSummary $pageName workdir -var WORKDIR_TEMPLATE 500 book getword stackPendingSummary $pageName dbname -var DBNAME 501 book getword stackPendingSummary $pageName tess_id -var TESS_DIR 502 book getword stackPendingSummary $pageName state -var RUN_STATE 503 book getword stackPendingSummary $pageName projection_cell -var projection_cell 504 505 # set the host and workdir 506 host anyhost 507 strsub $WORKDIR_TEMPLATE @HOST@.0 $default_host -var WORKDIR 508 509 basename $TESS_DIR -var TESS_ID 510 511 ## generate outroot specific to this association 512 sprintf outroot "%s/%s/%s.stk.%s.summary" $WORKDIR $TESS_ID $TESS_ID $SASS_ID 513 514 stdout $LOGDIR/stack.summary.log 515 stderr $LOGDIR/stack.summary.log 516 517 $run = skycell_jpeg.pl --stage stack --stage_id $SASS_ID --camera $CAMERA --outroot $outroot 518 add_standard_args run 519 520 # save the pageName for future reference below 521 options $pageName 522 523 # create the command line 524 if ($VERBOSE > 1) 525 echo command $run 526 end 527 periods -exec 0.05 528 command $run 529 end 530 531 # default exit status 532 task.exit default 533 process_exit stackPendingSummary $options:0 $JOB_STATUS 534 end 535 536 # locked list 537 task.exit crash 538 showcommand crash 539 echo "hostname: $JOB_HOSTNAME" 540 book setword stackPendingSummary $options:0 pantaskState CRASH 541 end 542 543 # operation timed out? 544 task.exit timeout 545 showcommand timeout 546 book setword stackPendingSummary $options:0 pantaskState TIMEOUT 547 end 548 end 549
Note:
See TracChangeset
for help on using the changeset viewer.
