Changeset 29837
- Timestamp:
- Nov 26, 2010, 10:34:11 AM (15 years ago)
- Location:
- branches/eam_branches/ipp-20101103/ippTasks
- Files:
-
- 6 edited
-
. (modified) (1 prop)
-
pstamp.pro (modified) (1 diff)
-
publish.pro (modified) (4 diffs)
-
science.cleanup.pro (modified) (2 diffs)
-
stack.pro (modified) (6 diffs)
-
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/pstamp.pro
r29613 r29837 134 134 end 135 135 task pstamp.cleanup.run 136 active false 137 end 138 end 139 macro pstamp.find.on 140 task pstamp.request.find 141 active true 142 end 143 end 144 macro pstamp.find.off 145 task pstamp.request.find.load 136 146 active false 137 147 end -
branches/eam_branches/ipp-20101103/ippTasks/publish.pro
r29507 r29837 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 57 65 task publish. trigger58 task publish.load 66 59 host local 67 60 … … 72 65 73 66 stdout NULL 74 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 112 task publish.load113 host local114 115 periods -poll $LOADPOLL116 periods -exec $LOADEXEC117 periods -timeout 30118 npending 1119 120 stdout NULL121 67 stderr $LOGDIR/publish.load.log 122 68 123 # this query should probably be label-based...124 69 task.exec 125 70 $run = pubtool -pending -
branches/eam_branches/ipp-20101103/ippTasks/science.cleanup.pro
r29431 r29837 8 8 diff.cleanup.on 9 9 stack.cleanup.on 10 chip.bg.cleanup.on 11 warp.bg.cleanup.on 10 12 end 11 13 … … 934 936 935 937 938 book init chipBGPendingCleanup 939 940 macro chip.bg.cleanup.status 941 book listbook chipBGPendingCleanup 942 end 943 944 macro chip.bg.cleanup.reset 945 book init chipBGPendingCleanup 946 end 947 948 macro chip.bg.cleanup.on 949 task chip.bg.cleanup.load 950 active true 951 end 952 task chip.bg.cleanup.run 953 active true 954 end 955 end 956 957 macro chip.bg.cleanup.off 958 task chip.bg.cleanup.load 959 active false 960 end 961 task chip.bg.cleanup.run 962 active false 963 end 964 end 965 966 # this variable will cycle through the known database names 967 $chip_bg_cleanup_DB = 0 968 969 task chip.bg.cleanup.load 970 host local 971 972 periods -poll $LOADPOLL 973 periods -exec $LOADEXEC 974 periods -timeout 30 975 npending 1 976 active false 977 978 stdout NULL 979 stderr $LOGDIR/chip.bg.cleanup.log 980 981 task.exec 982 if ($LABEL:n == 0) break 983 $run = bgtool -pendingcleanupchiprun 984 if ($DB:n == 0) 985 option DEFAULT 986 else 987 # save the DB name for the exit tasks 988 option $DB:$chip_bg_cleanup_DB 989 $run = $run -dbname $DB:$chip_bg_cleanup_DB 990 $chip_bg_cleanup_DB ++ 991 if ($chip_bg_cleanup_DB >= $DB:n) set chip_bg_cleanup_DB = 0 992 end 993 add_poll_args run 994 add_poll_labels run 995 command $run 996 end 997 998 # success 999 task.exit 0 1000 # convert 'stdout' to book format 1001 ipptool2book stdout chipBGPendingCleanup -key chip_bg_id -uniq -setword dbname $options:0 -setword pantaskState INIT 1002 if ($VERBOSE > 2) 1003 book listbook chipBGPendingCleanup 1004 end 1005 1006 # delete existing entries in the appropriate pantaskStates 1007 process_cleanup chipBGPendingCleanup 1008 end 1009 1010 # locked list 1011 task.exit default 1012 showcommand failure 1013 end 1014 1015 task.exit crash 1016 showcommand crash 1017 end 1018 1019 # operation times out? 1020 task.exit timeout 1021 showcommand timeout 1022 end 1023 end 1024 1025 # run the ipp_cleanup.pl script on pending images 1026 task chip.bg.cleanup.run 1027 periods -poll $RUNPOLL 1028 periods -exec $RUNEXEC 1029 periods -timeout 300 1030 active false 1031 1032 task.exec 1033 book npages chipBGPendingCleanup -var N 1034 if ($N == 0) 1035 periods -exec $RUNEXEC 1036 break 1037 end 1038 if ($NETWORK == 0) break 1039 1040 # look for new images in chipBGPendingCleanup (pantaskState == INIT) 1041 book getpage chipBGPendingCleanup 0 -var pageName -key pantaskState INIT 1042 if ("$pageName" == "NULL") break 1043 1044 book setword chipBGPendingCleanup $pageName pantaskState RUN 1045 book getword chipBGPendingCleanup $pageName camera -var CAMERA 1046 book getword chipBGPendingCleanup $pageName state -var CLEANUP_MODE 1047 book getword chipBGPendingCleanup $pageName chip_bg_id -var CHIP_BG_ID 1048 book getword chipBGPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE 1049 book getword chipBGPendingCleanup $pageName exp_tag -var EXP_TAG 1050 book getword chipBGPendingCleanup $pageName dbname -var DBNAME 1051 1052 # specify choice of local or remote host based on camera and chip (class_id) 1053 set.host.for.camera $CAMERA FPA 1054 set.workdir.by.camera $CAMERA FPA $WORKDIR_TEMPLATE $default_host WORKDIR 1055 sprintf logfile "%s/%s/%s.bgc.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_BG_ID 1056 1057 stdout $LOGDIR/chip.bg.cleanup.log 1058 stderr $LOGDIR/chip.bg.cleanup.log 1059 1060 # XXX is everything listed here needed? 1061 $run = ipp_cleanup.pl --stage chip_bg --stage_id $CHIP_BG_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $logfile 1062 add_standard_args run 1063 1064 # save the pageName for future reference below 1065 options $pageName 1066 1067 # create the command line 1068 if ($VERBOSE > 1) 1069 echo command $run 1070 end 1071 periods -exec 0.05 1072 command $run 1073 end 1074 1075 # default exit status 1076 task.exit default 1077 process_exit chipBGPendingCleanup $options:0 $JOB_STATUS 1078 end 1079 1080 task.exit crash 1081 showcommand crash 1082 book setword chipBGPendingCleanup $options:0 pantaskState CRASH 1083 end 1084 1085 # operation timed out? 1086 task.exit timeout 1087 showcommand timeout 1088 book setword chipBGPendingCleanup $options:0 pantaskState TIMEOUT 1089 end 1090 end 1091 1092 book init warpBGPendingCleanup 1093 1094 macro warp.bg.cleanup.status 1095 book listbook warpBGPendingCleanup 1096 end 1097 1098 macro warp.bg.cleanup.reset 1099 book init warpBGPendingCleanup 1100 end 1101 1102 macro warp.bg.cleanup.on 1103 task warp.bg.cleanup.load 1104 active true 1105 end 1106 task warp.bg.cleanup.run 1107 active true 1108 end 1109 end 1110 1111 macro warp.bg.cleanup.off 1112 task warp.bg.cleanup.load 1113 active false 1114 end 1115 task warp.bg.cleanup.run 1116 active false 1117 end 1118 end 1119 1120 # this variable will cycle through the known database names 1121 $warp_bg_cleanup_DB = 0 1122 1123 task warp.bg.cleanup.load 1124 host local 1125 1126 periods -poll $LOADPOLL 1127 periods -exec $LOADEXEC 1128 periods -timeout 300 1129 npending 1 1130 active false 1131 1132 stdout NULL 1133 stderr $LOGDIR/warp.bg.cleanup.log 1134 1135 task.exec 1136 if ($LABEL:n == 0) break 1137 $run = bgtool -pendingcleanupwarprun 1138 if ($DB:n == 0) 1139 option DEFAULT 1140 else 1141 # save the DB name for the exit tasks 1142 option $DB:$warp_bg_cleanup_DB 1143 $run = $run -dbname $DB:$warp_bg_cleanup_DB 1144 $warp_bg_cleanup_DB ++ 1145 if ($warp_bg_cleanup_DB >= $DB:n) set warp_bg_cleanup_DB = 0 1146 end 1147 add_poll_args run 1148 add_poll_labels run 1149 command $run 1150 end 1151 1152 # success 1153 task.exit 0 1154 # convert 'stdout' to book format 1155 ipptool2book stdout warpBGPendingCleanup -key warp_bg_id -uniq -setword dbname $options:0 -setword pantaskState INIT 1156 if ($VERBOSE > 2) 1157 book listbook warpBGPendingCleanup 1158 end 1159 1160 # delete existing entries in the appropriate pantaskStates 1161 process_cleanup warpBGPendingCleanup 1162 end 1163 1164 # locked list 1165 task.exit default 1166 showcommand failure 1167 end 1168 1169 task.exit crash 1170 showcommand crash 1171 end 1172 1173 # operation times out? 1174 task.exit timeout 1175 showcommand timeout 1176 end 1177 end 1178 1179 # run the ipp_cleanup.pl script on pending images 1180 task warp.bg.cleanup.run 1181 periods -poll $RUNPOLL 1182 periods -exec $RUNEXEC 1183 periods -timeout 300 1184 active false 1185 1186 task.exec 1187 book npages warpBGPendingCleanup -var N 1188 if ($N == 0) 1189 periods -exec $RUNEXEC 1190 break 1191 end 1192 if ($NETWORK == 0) break 1193 1194 # look for new images in warpBGPendingCleanup (pantaskState == INIT) 1195 book getpage warpBGPendingCleanup 0 -var pageName -key pantaskState INIT 1196 if ("$pageName" == "NULL") break 1197 1198 book setword warpBGPendingCleanup $pageName pantaskState RUN 1199 book getword warpBGPendingCleanup $pageName camera -var CAMERA 1200 book getword warpBGPendingCleanup $pageName state -var CLEANUP_MODE 1201 book getword warpBGPendingCleanup $pageName warp_bg_id -var WARP_BG_ID 1202 book getword warpBGPendingCleanup $pageName workdir -var WORKDIR_TEMPLATE 1203 book getword warpBGPendingCleanup $pageName exp_tag -var EXP_TAG 1204 book getword warpBGPendingCleanup $pageName dbname -var DBNAME 1205 1206 # specify choice of local or remote host based on camera and warp 1207 set.host.for.camera $CAMERA FPA 1208 set.workdir.by.camera $CAMERA $WARP_BG_ID $WORKDIR_TEMPLATE $default_host WORKDIR 1209 sprintf logfile "%s/%s/%s.bgw.%s.cleanup.log" $WORKDIR $EXP_TAG $EXP_TAG $WARP_BG_ID 1210 1211 stdout $LOGDIR/warp.bg.cleanup.log 1212 stderr $LOGDIR/warp.bg.cleanup.log 1213 1214 # XXX is everything listed here needed? 1215 $run = ipp_cleanup.pl --stage warp_bg --stage_id $WARP_BG_ID --camera $CAMERA --mode $CLEANUP_MODE --logfile $logfile 1216 add_standard_args run 1217 1218 # save the pageName for future reference below 1219 options $pageName 1220 1221 # create the command line 1222 if ($VERBOSE > 1) 1223 echo command $run 1224 end 1225 periods -exec 0.05 1226 command $run 1227 end 1228 1229 # default exit status 1230 task.exit default 1231 process_exit warpBGPendingCleanup $options:0 $JOB_STATUS 1232 end 1233 1234 task.exit crash 1235 showcommand crash 1236 book setword warpBGPendingCleanup $options:0 pantaskState CRASH 1237 end 1238 1239 # operation timed out? 1240 task.exit timeout 1241 showcommand timeout 1242 book setword warpBGPendingCleanup $options:0 pantaskState TIMEOUT 1243 end 1244 end -
branches/eam_branches/ipp-20101103/ippTasks/stack.pro
r28649 r29837 8 8 check.globals 9 9 10 if ($?POLL_LIMIT_STACK == 0) set POLL_LIMIT_STACK = 40 11 12 macro set.stack.poll 13 if ($0 != 2) 14 echo "USAGE:set.stack.poll (value)" 15 break 16 end 17 18 $POLL_LIMIT_STACK = $1 19 end 20 macro get.stack.poll 21 echo $POLL_LIMIT_STACK 22 end 23 10 24 ### Initialise the books containing the tasks to do 11 25 book init stackSumSkyfile 12 26 book init stackPendingSummary 13 #book init stackCleanup14 27 15 28 ### Database lists 16 29 $stackSkycell_DB = 0 17 30 $stack_revert_DB = 0 18 #$stackCleanup_DB = 019 31 $stackSummary_DB = 0 20 32 … … 22 34 macro stack.status 23 35 book listbook stackSumSkyfile 24 # book listbook stackCleanup25 36 end 26 37 … … 29 40 book init stackSumSkyfile 30 41 book init stackPendingSummary 31 # book init stackCleanup32 42 end 33 43 … … 81 91 end 82 92 end 83 84 85 86 87 88 # macro stack.cleanup.on89 # task stack.cleanup.load90 # active true91 # end92 # task stack.cleanup.run93 # active true94 # end95 # end96 97 # macro stack.cleanup.off98 # task stack.cleanup.load99 # active false100 # end101 # task stack.cleanup.run102 # active false103 # end104 # end105 93 106 94 … … 132 120 add_poll_args run 133 121 add_poll_labels run 134 # reduce the limit (the last one takes precedence)135 $run = $run -limit 40122 # change the limit (the last one on the command line takes precedence) 123 $run = $run -limit $POLL_LIMIT_STACK 136 124 command $run 137 125 end … … 246 234 end 247 235 end 248 249 250 # # select images ready for stack analysis251 # # new entries are added to stackCleanup252 # # skip already-present entries253 # task stack.cleanup.load254 # host local255 256 # periods -poll $LOADPOLL257 # periods -exec $LOADEXEC258 # periods -timeout 30259 # npending 1260 # active false261 262 # stdout NULL263 # stderr $LOGDIR/stack.cleanup.log264 265 # task.exec266 # if ($LABEL:n == 0) break267 # $run = stacktool -pendingcleanuprun268 # if ($DB:n == 0)269 # option DEFAULT270 # else271 # # save the DB name for the exit tasks272 # option $DB:$stackCleanup_DB273 # $run = $run -dbname $DB:$stackCleanup_DB274 # $stackCleanup_DB ++275 # if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0276 # end277 # add_poll_args run278 # add_poll_labels run279 # command $run280 # end281 282 # # success283 # task.exit 0284 # # convert 'stdout' to book format285 # ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT286 # if ($VERBOSE > 2)287 # book listbook stackCleanup288 # end289 290 # # delete existing entries in the appropriate pantaskStates291 # process_cleanup stackCleanup292 # end293 294 # # locked list295 # task.exit default296 # showcommand failure297 # end298 299 # task.exit crash300 # showcommand crash301 # end302 303 # # operation times out?304 # task.exit timeout305 # showcommand timeout306 # end307 # end308 309 # # run the ipp_cleanup.pl script on pending images310 # task stack.cleanup.run311 # periods -poll $RUNPOLL312 # periods -exec $RUNEXEC313 # periods -timeout 60314 # active false315 316 # task.exec317 # book npages stackCleanup -var N318 # if ($N == 0) break319 # if ($NETWORK == 0) break320 321 # # look for new images in stackCleanup (pantaskState == INIT)322 # book getpage stackCleanup 0 -var pageName -key pantaskState INIT323 # if ("$pageName" == "NULL") break324 325 # book setword stackCleanup $pageName pantaskState RUN326 # book getword stackCleanup $pageName camera -var CAMERA327 # book getword stackCleanup $pageName state -var CLEANUP_MODE328 # book getword stackCleanup $pageName stack_id -var STACK_ID329 # book getword stackCleanup $pageName dbname -var DBNAME330 331 # # specify choice of local or remote host based on camera and stack (class_id)332 # set.host.for.camera $CAMERA FPA333 334 # stdout $LOGDIR/stack.cleanup.log335 # stderr $LOGDIR/stack.cleanup.log336 337 # # XXX is everything listed here needed?338 # $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE339 # add_standard_args run340 341 # # save the pageName for future reference below342 # options $pageName343 344 # # create the command line345 # if ($VERBOSE > 1)346 # echo command $run347 # end348 # command $run349 # end350 351 # # default exit status352 # task.exit default353 # process_exit stackCleanup $options:0 $JOB_STATUS354 # end355 356 # task.exit crash357 # showcommand crash358 # book setword stackCleanup $options:0 pantaskState CRASH359 # end360 361 # # operation timed out?362 # task.exit timeout363 # showcommand timeout364 # book setword stackCleanup $options:0 pantaskState TIMEOUT365 # end366 # end367 368 369 236 370 237 -
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.
