Changeset 31868
- Timestamp:
- Jul 12, 2011, 12:28:19 PM (15 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/survey.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/survey.pro
r31797 r31868 33 33 book create SURVEY_WARP_BG 34 34 book create SURVEY_PUBLISH 35 book create SURVEY_STATICSKYSINGLE 35 36 $haveSurveyBooks = TRUE 36 37 end … … 46 47 $SURVEY_WARP_BG_DB = 0 47 48 $SURVEY_PUBLISH_DB = 0 49 $SURVEY_STATICSKYSINGLE_DB = 0 48 50 49 51 $SURVEY_EXEC = 120 … … 82 84 active true 83 85 end 86 task survey.staticskysingle 87 active true 88 end 84 89 end 85 90 … … 113 118 end 114 119 task survey.publish 120 active false 121 end 122 task survey.staticskysingle 115 123 active false 116 124 end … … 397 405 end 398 406 407 macro survey.add.staticskysingle 408 # adds each of the filters for the label chosen 409 # for LAP - the final stacks chosen have %final% in them, and we 410 # want some ability to choose that 411 # for others can use % 412 413 if ($0 != 7) 414 echo "USAGE: survey.add.staticskysingle (tag) (label) (workdir) (distgroup) (selectdatagroup) (filter)" 415 break 416 end 417 book newpage SURVEY_STATICSKYSINGLE $1 418 book setword SURVEY_STATICSKYSINGLE $1 LABEL $2 419 book setword SURVEY_STATICSKYSINGLE $1 WORKDIR $3 420 book setword SURVEY_STATICSKYSINGLE $1 DIST_GROUP $4 421 book setword SURVEY_STATICSKYSINGLE $1 SELECTDATAGROUP $5 422 book setword SURVEY_STATICSKYSINGLE $1 FILTER $6 423 book setword SURVEY_STATICSKYSINGLE $1 STATE PENDING 424 end 425 426 macro survey.show.staticskysingle 427 if ($0 != 1) 428 echo "USAGE: survey.show.staticskysingle" 429 break 430 end 431 book listbook SURVEY_STATICSKYSINGLE 432 end 433 434 macro survey.del.staticskysingle 435 if ($0 != 2) 436 echo "USAGE: survey.del.staticskysingle (tag)" 437 break 438 end 439 book delpage SURVEY_STATICSKYSINGLE $1 440 end 399 441 400 442 task survey.diff … … 1189 1231 end 1190 1232 end 1233 1234 1235 1236 task survey.staticskysingle 1237 host local 1238 1239 periods -poll $SURVEY_POLL 1240 periods -exec $SURVEY_EXEC 1241 periods -timeout $SURVEY_TIMEOUT 1242 npending 1 1243 1244 stdout $LOGDIR/survey.staticskysingle.log 1245 stderr $LOGDIR/survey.staticskysingle.log 1246 1247 task.exec 1248 book npages SURVEY_STATICSKYSINGLE -var N 1249 if ($N == 0) 1250 echo "No STATICSKYSINGLE labels for processing" 1251 break 1252 endif 1253 book getpage SURVEY_STATICSKYSINGLE 0 -var tag -key STATE NEW 1254 if ("$tag" == "NULL") 1255 # All tags have been done --- reset 1256 # echo "Resetting tags" 1257 for i 0 $N 1258 book getpage SURVEY_STATICSKYSINGLE $i -var tag 1259 book setword SURVEY_STATICSKYSINGLE $tag STATE NEW 1260 end 1261 book getpage SURVEY_STATICSKYSINGLE 0 -var tag -key STATE NEW 1262 1263 # Select different database 1264 $SURVEY_STATICSKYSINGLE_DB ++ 1265 if ($SURVEY_STATICSKYSINGLE_DB >= $DB:n) set SURVEY_STATICSKYSINGLE_DB = 0 1266 end 1267 1268 book setword SURVEY_STATICSKYSINGLE $tag STATE DONE 1269 book getword SURVEY_STATICSKYSINGLE $tag LABEL -var label 1270 book getword SURVEY_STATICSKYSINGLE $tag WORKDIR -var workdir 1271 book getword SURVEY_STATICSKYSINGLE $tag DIST_GROUP -var dist_group 1272 book getword SURVEY_STATICSKYSINGLE $tag SELECTDATAGROUP -var selectdatagroup 1273 book getword SURVEY_STATICSKYSINGLE $tag FILTER -var filter 1274 1275 $year = `date +%Y` 1276 $month = `date +%m` 1277 $day = `date +%d` 1278 1279 $run = staticskytool -definebyquery 1280 $run = $run -set_workdir $workdir/$label/$year/$month/$day 1281 $run = $run -set_dist_group $dist_group 1282 $run = $run -set_label $label 1283 $run = $run -select_label $label 1284 $run = $run -select_data_group $selectdatagroup 1285 $run = $run -select_filter $filter 1286 # $run = $run -pretend -simple 1287 1288 if ($DB:n == 0) 1289 option DEFAULT 1290 else 1291 $run = $run -dbname $DB:$SURVEY_STATICSKYSINGLE_DB 1292 option $DB:$SURVEY_STATICSKYSINGLE_DB 1293 end 1294 1295 # echo $run 1296 1297 command $run 1298 end 1299 1300 # success 1301 task.exit 0 1302 # echo "Success" 1303 end 1304 1305 # locked list 1306 task.exit default 1307 showcommand failure 1308 end 1309 1310 task.exit crash 1311 showcommand crash 1312 end 1313 1314 # operation times out? 1315 task.exit timeout 1316 showcommand timeout 1317 end 1318 end 1319
Note:
See TracChangeset
for help on using the changeset viewer.
