Index: trunk/ippTasks/addstar.pro
===================================================================
--- trunk/ippTasks/addstar.pro	(revision 39160)
+++ trunk/ippTasks/addstar.pro	(revision 40803)
@@ -6,13 +6,9 @@
 check.globals
 
-
 if ($?ADDSTAGES:n == 0)       set ADDSTAGES:n = 0
-if ($?MULTIADDSTAGES:n == 0)       set MULTIADDSTAGES:n = 0
-
-
+if ($?MULTIADDSTAGES:n == 0)  set MULTIADDSTAGES:n = 0
 
 book init addPendingExp
 book init addPendingMultiExp
-
     
 macro addstar.status
@@ -243,5 +239,5 @@
 $addstar_multi_stages_DB = 0
 
-    #this may not work for more databases (addstar) will do that later)
+# this may not work for more databases (addstar) will do that later)
 $addstar_revert_DB_C = 0
 $addstar_revert_DB_S = 0
@@ -253,8 +249,21 @@
 $addstar_revert_DB_DF = 0 
 
-
 #$LOADEXEC_ADD = 300
 $LOADEXEC_ADD = 10
 
+if ($?addstar_multiadd_limit == 0) set addstar_multiadd_limit = 0
+
+macro set.multiadd.limit
+  if ($0 != 2)
+    echo "USAGE: set.multiadd.limit (Nentry)"
+    break
+  end
+
+  $addstar_multiadd_limit = $1
+end
+
+macro get.multiadd.limit
+  echo "addstar multi limit : $addstar_multiadd_limit"
+end
 
 # select images ready for addstar analysis
@@ -545,5 +554,6 @@
   periods      -poll $RUNPOLL
   periods      -exec $RUNEXEC
-  periods      -timeout 1200
+  periods      -timeout 3600
+  # addstar MD fields with 250 exp takes about 2400 sec to load
 
   ## we want only a single outstanding addstar job.  
@@ -641,9 +651,12 @@
    # end
 
-
+    if ($addstar_multiadd_limit > 0) 
+      $run = $run --limit $addstar_multiadd_limit
+    end
 
     if ("$IMAGE_ONLY" == "T")
       $run = $run --image-only
     end
+
     if ("$MINIDVODB" == "T")
     $run = $run --minidvodb
