Changeset 30586 for branches/czw_branch/20101203/ippTasks/register.pro
- Timestamp:
- Feb 11, 2011, 4:29:48 PM (15 years ago)
- Location:
- branches/czw_branch/20101203
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/czw_branch/20101203
- Property svn:mergeinfo changed
-
branches/czw_branch/20101203/ippTasks
-
Property svn:mergeinfo
set to
/branches/eam_branches/ipp-20101103/ippTasks merged eligible /trunk/ippTasks merged eligible
-
Property svn:mergeinfo
set to
-
branches/czw_branch/20101203/ippTasks/register.pro
r30118 r30586 9 9 book init regPendingExp 10 10 book init regPendingBurntoolImfile 11 book init regDates 11 12 12 13 macro register.reset … … 14 15 book init regPendingExp 15 16 book init regPendingBurntoolImfile 17 book init regDates 16 18 end 17 19 … … 21 23 book listbook regPendingExp 22 24 book listbook regPendingBurntoolImfile 25 book listbook regDates 23 26 end 24 27 … … 30 33 active true 31 34 end 35 task register.imfile.revert 36 active false 37 end 32 38 task register.exp.load 33 39 active true … … 51 57 active false 52 58 end 59 task register.imfile.revert 60 active false 61 end 53 62 task register.exp.load 54 63 active false … … 65 74 end 66 75 67 $valid_burntool_value = 14 76 macro register.revert.on 77 task register.imfile.revert 78 active true 79 end 80 end 81 82 macro register.revert.off 83 task register.imfile.revert 84 active false 85 end 86 end 87 88 macro burntool.on 89 task register.burntool.load 90 active true 91 end 92 task register.burntool.run 93 active true 94 end 95 end 96 97 macro burntool.off 98 task register.burntool.load 99 active false 100 end 101 task register.burntool.run 102 active false 103 end 104 end 105 106 macro register.add.date 107 if ($0 != 4) 108 echo "USAGE: register.add.date (YYYY-MM-DD) (DBNAME) (VALID_BURNTOOL)" 109 break 110 end 111 112 book newpage regDates $1 113 book setword regDates $1 nsState NEW 114 book setword regDates $1 dbname $2 115 book setword regDates $1 valid_burntool $3 116 end 117 118 119 # $valid_burntool_value = 14 120 $sunrise = 17:30:00 121 $sunset = 03:30:00 68 122 69 123 macro replace.survey.values … … 147 201 $regPendingImfile_DB = 0 148 202 $regPendingBurntoolImfile_DB = 0 203 $regRevertImfile_DB = 0 149 204 $regPendingExp_DB = 0 150 205 … … 265 320 # XXX register_imfile.pl differs from the standard script : it does not have an 'outroot' argument, and it does not take '--redirect' 266 321 $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 322 $run = $run --sunset $sunset --sunrise $sunrise 267 323 add_standard_args run 268 324 … … 295 351 end 296 352 end 353 354 task register.imfile.revert 355 host local 356 periods -poll 60.0 357 periods -exec 1800.0 358 periods -timeout 120.0 359 npending 1 360 361 stdout NULL 362 stderr $LOGDIR/register.imfile.revert.log 363 364 task.exec 365 $run = regtool -revertprocessedimfile 366 if ($DB:n == 0) 367 option DEFAULT 368 else 369 option $DB:$regRevertImfile_DB 370 $run = $run -dbname $DB:$regRevertImfile_DB 371 $regRevertImfile_DB ++ 372 if ($regRevertImfile_DB >= $DB:n) set regRevertImfile_DB = 0 373 end 374 add_poll_args run 375 command $run 376 end 377 378 # success 379 task.exit 0 380 end 381 382 # locked list 383 task.exit default 384 showcommand failure 385 end 386 387 task.exit crash 388 showcommand crash 389 end 390 391 # operation times out 392 task.exit timeout 393 showcommand timeout 394 end 395 end 396 297 397 298 398 # select exposures ready for register_exp.pl … … 463 563 # select entried from the current DB; cycle to the next DB, if it exists 464 564 task.exec 565 book npages regDates -var Npages 566 if ($Npages == 0) 567 $today = `date -u +%Y-%m-%d` 568 $dbname = $DB:0 569 $valid_burntool = 14 570 else 571 book getpage regDates $reg_datePAGE -var today 572 book getword regDates $today dbname -var dbname 573 book getword regDates $today valid_burntool -var valid_burntool 574 $reg_datePAGE ++ 575 if ($reg_datePAGE >= $Npages) set reg_datePAGE = 0 576 end 577 465 578 $run = regtool -pendingburntoolimfile 466 $today = `date -u +%Y-%m-%d` 579 467 580 # 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 581 # $today = "2010-12-25" 582 $dateobs_begin = $today\T$sunset 583 $dateobs_end = $today\T$sunrise 584 $run = $run -dateobs_begin $dateobs_begin -dateobs_end $dateobs_end -valid_burntool $valid_burntool 585 $run = $run -dbname $dbname 586 option $dbname 587 # if ($DB:n == 0) 588 # option DEFAULT 589 # else 590 # # save the DB name for the exit tasks 591 # option $DB:$regPendingBurntoolImfile_DB 592 # $run = $run -dbname $DB:$regPendingBurntoolImfile_DB 593 # if ("$dbname" != "$DB:$regPendingBurntoolImfile_DB") 594 # break 595 # end 596 # $regPendingBurntoolImfile_DB ++ 597 # if ($regPendingBurntoolImfile_DB >= $DB:n) set regPendingBurntoolImfile_DB = 0 598 # end 479 599 480 600 # echo $run … … 574 694 end 575 695 576 696 task register.initday.load 697 host local 698 periods -poll $LOADPOLL 699 periods -exec $LOADEXEC 700 periods -timeout 30 701 trange 0:00:00 1:00:00 -nmax 1 702 npending 1 703 704 task.exec 705 $today = `date -u +%Y-%m-%d` 706 book newpage regDates $today 707 book setword regDates $today nsState NEW 708 book setword regDates $today dbname $DB:0 709 book setword regDates $today valid_burntool 14 710 711 command true 712 end 713 714 task.exit 0 715 # nothing to do here? 716 end 717 # locked list 718 task.exit default 719 showcommand failure 720 end 721 task.exit crash 722 showcommand crash 723 end 724 #operation times out? 725 task.exit timeout 726 showcommand timeout 727 end 728 end 729 577 730 578 731
Note:
See TracChangeset
for help on using the changeset viewer.
