Changeset 29837 for branches/eam_branches/ipp-20101103/ippTasks/survey.pro
- Timestamp:
- Nov 26, 2010, 10:34:11 AM (16 years ago)
- Location:
- branches/eam_branches/ipp-20101103/ippTasks
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
survey.pro (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20101103/ippTasks
- Property svn:mergeinfo changed (with no actual effect on merging)
-
branches/eam_branches/ipp-20101103/ippTasks/survey.pro
r29587 r29837 32 32 book create SURVEY_CHIP_BG 33 33 book create SURVEY_WARP_BG 34 book create SURVEY_PUBLISH 34 35 $haveSurveyBooks = TRUE 35 36 end … … 44 45 $SURVEY_CHIP_BG_DB = 0 45 46 $SURVEY_WARP_BG_DB = 0 47 $SURVEY_PUBLISH_DB = 0 46 48 47 49 $SURVEY_EXEC = 120 … … 77 79 active true 78 80 end 81 task survey.publish 82 active true 83 end 79 84 end 80 85 … … 105 110 end 106 111 task survey.warp.bg 112 active false 113 end 114 task survey.publish 107 115 active false 108 116 end … … 355 363 book listbook SURVEY_WARP_BG 356 364 end 365 366 # user functions to manipulate publish labels 367 macro survey.add.publish 368 if ($0 != 3) 369 echo "USAGE: survey.add.publish (label) (client_id)" 370 break 371 end 372 book newpage SURVEY_PUBLISH $1 373 book setword SURVEY_PUBLISH $1 CLIENT_ID $2 374 book setword SURVEY_PUBLISH $1 STATE PENDING 375 end 376 377 macro survey.del.publish 378 if ($0 != 2) 379 echo "USAGE: survey.del.publish (label)" 380 break 381 end 382 book delpage SURVEY_PUBLISH $1 383 end 384 385 macro survey.show.publish 386 if ($0 != 1) 387 echo "USAGE: survey.show.publish" 388 break 389 end 390 book listbook SURVEY_PUBLISH 391 end 392 357 393 358 394 task survey.diff … … 579 615 end 580 616 581 echo $run617 # echo $run 582 618 command $run 583 619 end … … 651 687 end 652 688 653 echo $run689 # echo $run 654 690 command $run 655 691 end … … 674 710 end 675 711 end 712 676 713 677 714 task survey.addstar … … 723 760 724 761 $run = $run -definebyquery -destreaked -label $label -set_dvodb $dvodb -set_minidvodb_group $minidvodb_group -set_minidvodb -set_label $minidvodb_group 725 echo $run762 # echo $run 726 763 command $run 727 764 end … … 790 827 option DEFAULT 791 828 else 792 $run = $run --dbname $DB:$SURVEY_ MAGIC_DB793 option $DB:$SURVEY_ MAGIC_DB829 $run = $run --dbname $DB:$SURVEY_DESTREAK_DB 830 option $DB:$SURVEY_DESTREAK_DB 794 831 end 795 832 … … 934 971 end 935 972 936 echo $run973 # echo $run 937 974 command $run 938 975 end … … 1004 1041 end 1005 1042 1006 echo $run1043 # echo $run 1007 1044 command $run 1008 1045 end … … 1027 1064 end 1028 1065 end 1066 1067 task survey.publish 1068 host local 1069 1070 periods -poll $SURVEY_POLL 1071 periods -exec $SURVEY_EXEC 1072 periods -timeout $SURVEY_TIMEOUT 1073 npending 1 1074 1075 stdout $LOGDIR/survey.publish.log 1076 stderr $LOGDIR/survey.publish.log 1077 1078 # generate publish runs 1079 task.exec 1080 book npages SURVEY_PUBLISH -var N 1081 if ($N == 0) 1082 # echo "No labels for processing" 1083 break 1084 endif 1085 1086 book getpage SURVEY_PUBLISH 0 -var label -key STATE NEW 1087 if ("$label" == "NULL") 1088 # All labels have been done --- reset 1089 # echo "Resetting labels" 1090 for i 0 $N 1091 book getpage SURVEY_PUBLISH $i -var label 1092 book setword SURVEY_PUBLISH $label STATE NEW 1093 end 1094 book getpage SURVEY_PUBLISH 0 -var label -key STATE NEW 1095 1096 # Select different database 1097 $SURVEY_PUBLISH ++ 1098 if ($SURVEY_PUBLISH >= $DB:n) set SURVEY_PUBLISH = 0 1099 end 1100 1101 book setword SURVEY_PUBLISH $label STATE DONE 1102 book getword SURVEY_PUBLISH $label CLIENT_ID -var client_id 1103 1104 $run = pubtool -definerun -label $label -client_id $client_id 1105 1106 if ($DB:n == 0) 1107 option DEFAULT 1108 else 1109 $run = $run -dbname $DB:$SURVEY_PUBLISH 1110 option $DB:$SURVEY_PUBLISH 1111 end 1112 1113 #echo $run 1114 command $run 1115 end 1116 1117 # success 1118 task.exit 0 1119 #echo "Success" 1120 end 1121 1122 # locked list 1123 task.exit default 1124 showcommand failure 1125 end 1126 1127 task.exit crash 1128 showcommand crash 1129 end 1130 1131 # operation times out? 1132 task.exit timeout 1133 showcommand timeout 1134 end 1135 end
Note:
See TracChangeset
for help on using the changeset viewer.
