Changeset 30049 for trunk/ippTasks/register.pro
- Timestamp:
- Dec 15, 2010, 1:29:28 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippTasks/register.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/czw_branch/20101203 (added) merged: 29907-29909,29965,29982,30014,30017-30018,30047-30048
- Property svn:mergeinfo changed
-
trunk/ippTasks/register.pro
r25418 r30049 8 8 book init regPendingImfile 9 9 book init regPendingExp 10 book init regPendingBurntoolImfile 10 11 11 12 macro register.reset 12 13 book init regPendingImfile 13 14 book init regPendingExp 15 book init regPendingBurntoolImfile 14 16 end 15 17 … … 18 20 book listbook regPendingImfile 19 21 book listbook regPendingExp 22 book listbook regPendingBurntoolImfile 20 23 end 21 24 … … 33 36 active true 34 37 end 38 task register.burntool.load 39 active true 40 end 41 task register.burntool.run 42 active true 43 end 35 44 end 36 45 … … 48 57 active false 49 58 end 50 end 59 task register.burntool.load 60 active false 61 end 62 task register.burntool.run 63 active false 64 end 65 end 66 67 $valid_burntool_value = 14 51 68 52 69 macro replace.survey.values … … 129 146 # these variables will cycle through the known database names 130 147 $regPendingImfile_DB = 0 148 $regPendingBurntoolImfile_DB = 0 131 149 $regPendingExp_DB = 0 132 150 … … 429 447 end 430 448 449 450 # select imfiles that can now be burntooled. 451 task register.burntool.load 452 host local 453 454 periods -poll $LOADPOLL 455 periods -exec $LOADEXEC 456 periods -timeout 30 457 npending 1 458 459 # silently drop stdout 460 stdout NULL 461 stderr $LOGDIR/register.burntool.load.log 462 463 # select entried from the current DB; cycle to the next DB, if it exists 464 task.exec 465 $run = regtool -pendingburntoolimfile 466 $today = `date -u +%Y-%m-%d` 467 # debugging purposes 468 $today = "2010-12-06" 469 $run = $run -date $today -valid_burntool $valid_burntool_value 470 if ($DB:n == 0) 471 option DEFAULT 472 else 473 # save the DB name for the exit tasks 474 option $DB:$regPendingBurntoolImfile_DB 475 $run = $run -dbname $DB:$regPendingBurntoolImfile_DB 476 $regPendingBurntoolImfile_DB ++ 477 if ($regPendingBurntoolImfile_DB >= $DB:n) set regPendingBurntoolImfile_DB = 0 478 end 479 480 echo $run 481 add_poll_args run 482 command $run 483 end 484 485 # success 486 task.exit $EXIT_SUCCESS 487 # convert 'stdout' to book format 488 ipptool2book stdout regPendingBurntoolImfile -key exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT 489 book shuffle regPendingBurntoolImfile 490 if ($VERBOSE > 2) 491 book listbook regPendingBurntoolImfile 492 end 493 494 # delete existing entries in the appropriate pantasksStates 495 process_cleanup regPendingBurntoolImfile 496 end 497 498 # locked list 499 task.exit default 500 showcommand failure 501 end 502 task.exit crash 503 showcommand crash 504 end 505 task.exit timeout 506 showcommand timeout 507 end 508 end 509 510 # run the ipp_apply_burntool_single.pl script on the pending images 511 task register.burntool.run 512 periods -poll $RUNPOLL 513 periods -exec $RUNEXEC 514 periods -timeout 30 515 516 task.exec 517 if ($NETWORK == 0) break 518 book npages regPendingBurntoolImfile -var N 519 if ($N == 0) 520 periods -exec $RUNEXEC 521 break 522 end 523 periods -exec 0.05 524 525 # look for new images to burn in regPendingBurntoolImfile 526 book getpage regPendingBurntoolImfile 0 -var pageName -key pantaskState INIT 527 if ("$pageName" == "NULL") break 528 529 book setword regPendingBurntoolImfile $pageName pantaskState RUN 530 531 book getword regPendingBurntoolImfile $pageName exp_id -var EXP_ID 532 book getword regPendingBurntoolImfile $pageName class_id -var CLASS_ID 533 book getword regPendingBurntoolImfile $pageName uri -var THIS_URI 534 book getword regPendingBurntoolImfile $pageName previous_uri -var PREVIOUS_URI 535 book getword regPendingBurntoolImfile $pageName camera -var CAMERA 536 book getword regPendingBurntoolImfile $pageName dbname -var DBNAME 537 set.host.for.camera $CAMERA $CLASS_ID 538 539 stdout $LOGDIR/register.burntool.run.log 540 stderr $LOGDIR/register.burntool.run.log 541 542 $run = ipp_apply_burntool_single.pl --exp_id $EXP_ID --class_id $CLASS_ID --this_uri $THIS_URI 543 if ("$PREVIOUS_URI" != "NULL") 544 $run = $run --previous_uri $PREVIOUS_URI 545 end 546 547 add_standard_args run 548 549 options $pageName 550 551 if ($VERBOSE > 1) 552 echo command $run 553 end 554 command $run 555 end 556 557 # default exit status 558 task.exit default 559 process_exit regPendingBurntoolImfile $options:0 $JOB_STATUS 560 end 561 562 # locked list 563 task.exit crash 564 showcommand crash 565 echo "hostname: $JOB_HOSTNAME" 566 book setword regPendingBurntoolImfile $options:0 pantaskState CRASH 567 end 568 569 # operation timed out 570 task.exit timeout 571 showcommand timeout 572 book setword regPendingBurntoolImfile $options:0 pantaskState TIMEOUT 573 end 574 end 575 576 577 578 431 579 ## XXX add a global path to output files
Note:
See TracChangeset
for help on using the changeset viewer.
