IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 26, 2010, 10:34:11 AM (16 years ago)
Author:
eugene
Message:

merge updates from trunk

Location:
branches/eam_branches/ipp-20101103/ippTasks
Files:
2 edited

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/survey.pro

    r29587 r29837  
    3232 book create SURVEY_CHIP_BG
    3333 book create SURVEY_WARP_BG
     34 book create SURVEY_PUBLISH
    3435 $haveSurveyBooks = TRUE
    3536end
     
    4445$SURVEY_CHIP_BG_DB = 0
    4546$SURVEY_WARP_BG_DB = 0
     47$SURVEY_PUBLISH_DB = 0
    4648
    4749$SURVEY_EXEC = 120
     
    7779    active true
    7880  end
     81  task survey.publish
     82    active true
     83  end
    7984end
    8085
     
    105110  end
    106111  task survey.warp.bg
     112    active false
     113  end
     114  task survey.publish
    107115    active false
    108116  end
     
    355363  book listbook SURVEY_WARP_BG
    356364end
     365
     366# user functions to manipulate publish labels
     367macro 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
     375end
     376
     377macro survey.del.publish
     378  if ($0 != 2)
     379    echo "USAGE: survey.del.publish (label)"
     380    break
     381  end
     382  book delpage SURVEY_PUBLISH $1
     383end
     384
     385macro survey.show.publish
     386  if ($0 != 1)
     387    echo "USAGE: survey.show.publish"
     388    break
     389  end
     390  book listbook SURVEY_PUBLISH
     391end
     392
    357393
    358394task survey.diff
     
    579615    end
    580616   
    581     echo $run
     617    # echo $run
    582618    command $run
    583619  end
     
    651687    end
    652688   
    653     echo $run
     689    # echo $run
    654690    command $run
    655691  end
     
    674710  end
    675711end
     712
    676713
    677714task survey.addstar
     
    723760   
    724761    $run = $run -definebyquery -destreaked -label $label -set_dvodb $dvodb -set_minidvodb_group $minidvodb_group -set_minidvodb -set_label $minidvodb_group
    725     echo $run
     762    # echo $run
    726763    command $run
    727764  end
     
    790827      option DEFAULT
    791828    else
    792       $run = $run --dbname $DB:$SURVEY_MAGIC_DB
    793       option $DB:$SURVEY_MAGIC_DB
     829      $run = $run --dbname $DB:$SURVEY_DESTREAK_DB
     830      option $DB:$SURVEY_DESTREAK_DB
    794831    end
    795832   
     
    934971    end
    935972   
    936     echo $run
     973    # echo $run
    937974    command $run
    938975  end
     
    10041041    end
    10051042   
    1006     echo $run
     1043    # echo $run
    10071044    command $run
    10081045  end
     
    10271064  end
    10281065end
     1066
     1067task 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
     1135end
Note: See TracChangeset for help on using the changeset viewer.