Changeset 29723
- Timestamp:
- Nov 9, 2010, 2:51:43 PM (16 years ago)
- Location:
- tags/ipp-20101029/ippTasks
- Files:
-
- 2 edited
-
publish.pro (modified) (3 diffs, 1 prop)
-
survey.pro (modified) (12 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20101029/ippTasks/publish.pro
- Property svn:mergeinfo set to
r29507 r29723 15 15 16 16 macro publish.on 17 task publish.trigger18 active true19 end20 17 task publish.load 21 18 active true … … 30 27 31 28 macro publish.off 32 task publish.trigger33 active false34 end35 29 task publish.load 36 30 active false … … 59 53 60 54 # this variable will cycle through the known database names 61 $publish_trigger_DB = 062 55 $publish_load_DB = 0 63 56 $publish_revert_DB = 0 64 65 task publish.trigger66 host local67 68 periods -poll $LOADPOLL69 periods -exec $LOADEXEC70 periods -timeout 3071 npending 172 73 stdout NULL74 stderr $LOGDIR/publish.trigger.log75 76 task.exec77 if ($LABEL:n == 0) break78 #otherwise everything will be queued when there is no label.79 $run = pubtool -definerun80 if ($DB:n == 0)81 option DEFAULT82 else83 # save the DB name for the exit tasks84 option $DB:$publish_trigger_DB85 $run = $run -dbname $DB:$publish_trigger_DB86 $publish_trigger_DB ++87 if ($publish_trigger_DB >= $DB:n) set publish_trigger_DB = 088 end89 add_poll_labels run90 command $run91 end92 93 # success94 task.exit 095 end96 97 # locked list98 task.exit default99 showcommand failure100 end101 102 task.exit crash103 showcommand crash104 end105 106 # operation times out?107 task.exit timeout108 showcommand timeout109 end110 end111 57 112 58 task publish.load -
tags/ipp-20101029/ippTasks/survey.pro
- Property svn:mergeinfo set to
r29587 r29723 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 … … 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 echo $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.
