Changeset 35331
- Timestamp:
- Mar 27, 2013, 3:39:27 PM (13 years ago)
- File:
-
- 1 edited
-
trunk/ippTasks/survey.pro (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTasks/survey.pro
r34976 r35331 18 18 book create SURVEY_STATICSKYSINGLE 19 19 book create SURVEY_SKYCAL 20 book create SURVEY_LAPGROUP 20 21 $haveSurveyBooks = TRUE 21 22 end … … 33 34 $SURVEY_PUBLISH_DB = 0 34 35 $SURVEY_SKYCAL_DB = 0 36 $SURVEY_LAPGROUP_DB = 0 35 37 $SURVEY_STATICSKYSINGLE_DB = 0 36 38 $SURVEY_EXEC = 120 … … 78 80 active true 79 81 end 82 task survey.lapgroup 83 active true 84 end 80 85 end 81 86 … … 118 123 end 119 124 task survey.skycal 125 active false 126 end 127 task survey.lapgroup 120 128 active false 121 129 end … … 494 502 macro survey.show.skycal 495 503 if ($0 != 1) 496 echo "USAGE: survey.show.sky acl"504 echo "USAGE: survey.show.skycal" 497 505 break 498 506 end 499 507 book listbook SURVEY_SKYCAL 508 end 509 510 macro survey.add.lapgroup 511 if ($0 != 3) 512 echo "USAGE: survey.add.lapgroup (label) (seq_id)" 513 break 514 end 515 book newpage SURVEY_LAPGROUP $1 516 book setword SURVEY_LAPGROUP $1 LABEL $1 517 book setword SURVEY_LAPGROUP $1 SEQ_ID $2 518 book setword SURVEY_LAPGROUP $1 STATE PENDING 519 end 520 521 macro survey.del.lapgroup 522 if ($0 != 2) 523 echo "USAGE: survey.del.lapgroup (label)" 524 break 525 end 526 book delpage SURVEY_LAPGROUP $1 527 end 528 529 macro survey.show.lapgroup 530 if ($0 != 1) 531 echo "USAGE: survey.show.lapgroup" 532 break 533 end 534 book listbook SURVEY_LAPGROUP 500 535 end 501 536 … … 1561 1596 end 1562 1597 end 1598 1599 task survey.lapgroup 1600 host local 1601 1602 periods -poll $SURVEY_POLL 1603 periods -exec $SURVEY_EXEC 1604 periods -timeout $SURVEY_TIMEOUT 1605 npending 1 1606 1607 stdout $LOGDIR/survey.lapgroup.log 1608 stderr $LOGDIR/survey.lapgroup.log 1609 1610 task.exec 1611 book npages SURVEY_LAPGROUP -var N 1612 if ($N == 0) 1613 # echo "No labels for processing" 1614 break 1615 endif 1616 1617 book getpage SURVEY_LAPGROUP 0 -var label -key STATE NEW 1618 if ("$label" == "NULL") 1619 # All labels have been done --- reset 1620 # echo "Resetting labels" 1621 for i 0 $N 1622 book getpage SURVEY_LAPGROUP $i -var label 1623 book setword SURVEY_LAPGROUP $label STATE NEW 1624 end 1625 book getpage SURVEY_LAPGROUP 0 -var label -key STATE NEW 1626 1627 # Select different database 1628 $SURVEY_LAPGROUP ++ 1629 if ($SURVEY_LAPGROUP >= $DB:n) set SURVEY_LAPGROUP = 0 1630 end 1631 1632 book setword SURVEY_LAPGROUP $label STATE DONE 1633 book getword SURVEY_LAPGROUP $label SEQ_ID -var SEQ_ID 1634 1635 # For now the list of filters 1636 $run = laptool -definegroup -seq_id $SEQ_ID -set_label $label -filter g.00000 -filter r.00000 -filter i.00000 -filter z.00000 -filter y.00000 1637 1638 if ($DB:n == 0) 1639 option DEFAULT 1640 else 1641 $run = $run -dbname $DB:$SURVEY_LAPGROUP_DB 1642 option $DB:$SURVEY_LAPGROUP_DB 1643 end 1644 1645 # echo $run 1646 command $run 1647 end 1648 1649 # success 1650 task.exit 0 1651 # echo "Success" 1652 end 1653 1654 # locked list 1655 task.exit default 1656 showcommand failure 1657 end 1658 1659 task.exit crash 1660 showcommand crash 1661 end 1662 1663 # operation times out? 1664 task.exit timeout 1665 showcommand timeout 1666 end 1667 end
Note:
See TracChangeset
for help on using the changeset viewer.
