Changeset 28836
- Timestamp:
- Aug 3, 2010, 10:25:36 AM (16 years ago)
- File:
-
- 1 edited
-
tags/ipp-20100701/ippTasks/survey.pro (modified) (6 diffs, 1 prop)
Legend:
- Unmodified
- Added
- Removed
-
tags/ipp-20100701/ippTasks/survey.pro
- Property svn:mergeinfo set to
r28211 r28836 30 30 book create SURVEY_DIST 31 31 book create SURVEY_ADDSTAR 32 book create SURVEY_CHIP_BG 33 book create SURVEY_WARP_BG 32 34 $haveSurveyBooks = TRUE 33 35 end … … 40 42 $SURVEY_DIST_DB = 0 41 43 $SURVEY_ADDSTAR_DB = 0 44 $SURVEY_CHIP_BG_DB = 0 45 $SURVEY_WARP_BG_DB = 0 42 46 43 47 $SURVEY_EXEC = 120 … … 67 71 active true 68 72 end 73 task survey.chip.bg 74 active true 75 end 76 task survey.warp.bg 77 active true 78 end 69 79 end 70 80 … … 89 99 end 90 100 task survey.dist 101 active false 102 end 103 task survey.chip.bg 104 active false 105 end 106 task survey.warp.bg 91 107 active false 92 108 end … … 286 302 end 287 303 304 # user functions to manipulate chip_bg labels 305 macro survey.add.chip.bg 306 if ($0 != 3) 307 echo "USAGE: survey.add.chip.bg (label) (dist_group)" 308 break 309 end 310 book newpage SURVEY_CHIP_BG $1 311 book setword SURVEY_CHIP_BG $1 DIST_GROUP $2 312 book setword SURVEY_CHIP_BG $1 STATE PENDING 313 end 314 315 macro survey.del.chip.bg 316 if ($0 != 2) 317 echo "USAGE: survey.del.chip.bg (label)" 318 break 319 end 320 book delpage SURVEY_CHIP_BG $1 321 end 322 323 macro survey.show.chip.bg 324 if ($0 != 1) 325 echo "USAGE: survey.show.chip.bg" 326 break 327 end 328 book listbook SURVEY_CHIP_BG 329 end 330 331 # user functions to manipulate warp_bg labels 332 macro survey.add.warp.bg 333 if ($0 != 3) 334 echo "USAGE: survey.add.warp.bg (label) (dist_group)" 335 break 336 end 337 book newpage SURVEY_WARP_BG $1 338 book setword SURVEY_WARP_BG $1 DIST_GROUP $2 339 book setword SURVEY_WARP_BG $1 STATE PENDING 340 end 341 342 macro survey.del.warp.bg 343 if ($0 != 2) 344 echo "USAGE: survey.del.warp.bg (label)" 345 break 346 end 347 book delpage SURVEY_WARP_BG $1 348 end 349 350 macro survey.show.warp.bg 351 if ($0 != 1) 352 echo "USAGE: survey.show.warp.bg" 353 break 354 end 355 book listbook SURVEY_WARP_BG 356 end 288 357 289 358 task survey.diff … … 815 884 end 816 885 end 886 887 task survey.chip.bg 888 host local 889 890 periods -poll $SURVEY_POLL 891 periods -exec $SURVEY_EXEC 892 periods -timeout $SURVEY_TIMEOUT 893 npending 1 894 895 stdout $LOGDIR/survey.chip.bg.log 896 stderr $LOGDIR/survey.chip.bg.log 897 898 # generate chip_bg runs 899 task.exec 900 book npages SURVEY_CHIP_BG -var N 901 if ($N == 0) 902 # echo "No labels for processing" 903 break 904 endif 905 906 book getpage SURVEY_CHIP_BG 0 -var label -key STATE NEW 907 if ("$label" == "NULL") 908 # All labels have been done --- reset 909 # echo "Resetting labels" 910 for i 0 $N 911 book getpage SURVEY_CHIP_BG $i -var label 912 book setword SURVEY_CHIP_BG $label STATE NEW 913 end 914 book getpage SURVEY_CHIP_BG 0 -var label -key STATE NEW 915 916 # Select different database 917 $SURVEY_CHIP_BG ++ 918 if ($SURVEY_CHIP_BG >= $DB:n) set SURVEY_CHIP_BG = 0 919 end 920 921 book setword SURVEY_CHIP_BG $label STATE DONE 922 book getword SURVEY_CHIP_BG $label DIST_GROUP -var dist_group 923 924 $run = bgtool -definechip -label $label -set_dist_group $dist_group 925 926 if ($DB:n == 0) 927 option DEFAULT 928 else 929 $run = $run -dbname $DB:$SURVEY_CHIP_BG 930 option $DB:$SURVEY_CHIP_BG 931 end 932 933 echo $run 934 command $run 935 end 936 937 # success 938 task.exit 0 939 # echo "Success" 940 end 941 942 # locked list 943 task.exit default 944 showcommand failure 945 end 946 947 task.exit crash 948 showcommand crash 949 end 950 951 # operation times out? 952 task.exit timeout 953 showcommand timeout 954 end 955 end 956 957 task survey.warp.bg 958 host local 959 960 periods -poll $SURVEY_POLL 961 periods -exec $SURVEY_EXEC 962 periods -timeout $SURVEY_TIMEOUT 963 npending 1 964 965 stdout $LOGDIR/survey.warp.bg.log 966 stderr $LOGDIR/survey.warp.bg.log 967 968 # generate warp_bg runs 969 task.exec 970 book npages SURVEY_WARP_BG -var N 971 if ($N == 0) 972 # echo "No labels for processing" 973 break 974 endif 975 976 book getpage SURVEY_WARP_BG 0 -var label -key STATE NEW 977 if ("$label" == "NULL") 978 # All labels have been done --- reset 979 # echo "Resetting labels" 980 for i 0 $N 981 book getpage SURVEY_WARP_BG $i -var label 982 book setword SURVEY_WARP_BG $label STATE NEW 983 end 984 book getpage SURVEY_WARP_BG 0 -var label -key STATE NEW 985 986 # Select different database 987 $SURVEY_WARP_BG ++ 988 if ($SURVEY_WARP_BG >= $DB:n) set SURVEY_WARP_BG = 0 989 end 990 991 book setword SURVEY_WARP_BG $label STATE DONE 992 book getword SURVEY_WARP_BG $label DIST_GROUP -var dist_group 993 994 $run = bgtool -definewarp -warp_label $label -set_dist_group $dist_group 995 996 if ($DB:n == 0) 997 option DEFAULT 998 else 999 $run = $run -dbname $DB:$SURVEY_WARP_BG 1000 option $DB:$SURVEY_WARP_BG 1001 end 1002 1003 echo $run 1004 command $run 1005 end 1006 1007 # success 1008 task.exit 0 1009 # echo "Success" 1010 end 1011 1012 # locked list 1013 task.exit default 1014 showcommand failure 1015 end 1016 1017 task.exit crash 1018 showcommand crash 1019 end 1020 1021 # operation times out? 1022 task.exit timeout 1023 showcommand timeout 1024 end 1025 end
Note:
See TracChangeset
for help on using the changeset viewer.
