IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28035


Ignore:
Timestamp:
May 19, 2010, 3:05:14 PM (16 years ago)
Author:
heather
Message:

this works with addstar_run.pl, which supports minidvodb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/haf_branches/ipp.20100512/ippTasks/addstar.pro

    r27280 r28035  
    77
    88book init addPendingExp
     9book init minidvodbPending
    910
    1011macro addstar.status
     
    4546end
    4647
     48macro minidvodb.status
     49  book listbook minidvodbPending
     50end
     51
     52macro minidvodb.reset
     53  book init minidvodbPending
     54end
     55
     56macro minidvodb.create.on
     57  task minidvodb.create
     58    active true
     59  end
     60end
     61macro minidvodb.create.off
     62  task minidvodb.create
     63    active false
     64  end
     65end
     66
    4767# this variable will cycle through the known database names
    4868$addstar_DB = 0
    4969$addstar_revert_DB = 0
     70$minidvodb_DB = 0
     71$minidvodb_revert_DB = 0
     72
    5073
    5174# select images ready for addstar analysis
     
    6487
    6588  task.exec
    66     if ($LABEL:n == 0) break
     89   # if ($LABEL:n == 0) break
    6790    $run = addtool -pendingexp
    6891    if ($DB:n == 0)
     
    134157    book getword addPendingExp $pageName reduction -var REDUCTION
    135158    book getword addPendingExp $pageName dvodb  -var DVODB
     159    book getword addPendingExp $pageName minidvodb  -var MINIDVODB
     160    book getword addPendingExp $pageName minidvodb_name  -var MINIDVODB_NAME
     161    book getword addPendingExp $pageName minidvodb_group  -var MINIDVODB_GROUP
    136162    book getword addPendingExp $pageName image_only -var IMAGE_ONLY
    137163    book getword addPendingExp $pageName dbname -var DBNAME
     
    164190      $run = $run --image-only
    165191    end
     192    if ("$MINIDVODB" == "T")
     193    $run = $run --minidvodb
     194    $run = $run --minidvodb_group
     195        if ("$MINIDVODB_NAME" != "NULL")
     196           $run = $run --minidvodb_name  #have addstar_run.pl grab the 'active' name if it is NULL
     197        end
     198    end
    166199   
    167200    add_standard_args run
     
    242275  end
    243276end
     277
     278task minidvodb.create
     279  host         local
     280
     281  periods      -poll 5.0
     282  periods      -exec 60.0
     283  periods      -timeout 1200
     284  npending     1
     285  active        false
     286
     287  stdout NULL
     288  stderr $LOGDIR/revert.log
     289
     290  task.exec
     291    if ($LABEL:n == 0) break
     292    $run = addtool -revertprocessedexp
     293    if ($DB:n == 0)
     294      option DEFAULT
     295    else
     296      # save the DB name for the exit tasks
     297      option $DB:$addstar_revert_DB
     298      $run = $run -dbname $DB:$addstar_revert_DB
     299      $addstar_revert_DB ++
     300      if ($addstar_revert_DB >= $DB:n) set addstar_revert_DB = 0
     301    end
     302    add_poll_labels run
     303    command $run
     304  end
     305
     306  # success
     307  task.exit    0
     308  end
     309
     310  # locked list
     311  task.exit    default
     312    showcommand failure
     313  end
     314
     315  task.exit    crash
     316    showcommand crash
     317  end
     318
     319  # operation times out?
     320  task.exit    timeout
     321    showcommand timeout
     322  end
     323end
     324
Note: See TracChangeset for help on using the changeset viewer.