Index: trunk/ippTasks/minidvodb.pro
===================================================================
--- trunk/ippTasks/minidvodb.pro	(revision 28181)
+++ trunk/ippTasks/minidvodb.pro	(revision 28211)
@@ -227,4 +227,5 @@
     end
 #using check as opposed to list because it sees if it is done with the addRun state yet.  
+    book setword MINIDVODB $minidvodb_group STATE DONE
     $run = addtool -checkminidvodbrunaddrun -state waiting
     $run = $run -minidvodb_group $minidvodb_group
@@ -369,6 +370,7 @@
       if ($MINIDVODB_DB >= $DB:n) set MINIDVODB_DB = 0
     end
-    #finds the minidvodbs in a state of 'to_be_merged'    
-    $run = addtool -listminidvodbrun -state to_be_merged
+    #finds the minidvodbs in a state of 'to_be_merged' 
+    book setword MINIDVODB_MERGE $minidvodb_group STATE DONE
+    $run = addtool -listminidvodbrun -state to_be_merged -limit 1
     $run = $run -minidvodb_group $minidvodb_group
     if ($DB:n == 0)
@@ -418,5 +420,10 @@
   periods      -poll $RUNPOLL
   periods      -exec $RUNEXEC
-  periods      -timeout 60
+  periods      -timeout 20000
+  
+  #we only want one running at a time
+
+  host         local
+  npending     1
 
   task.exec
@@ -447,5 +454,5 @@
       # save the DB name for the exit tasks
       option $DB:$MINIDVODB_DB
-      $run = $run -dbname $DB:$MINIDVODB_DB
+      $run = $run --dbname $DB:$MINIDVODB_DB
       $MINIDVODB_DB ++
       if ($MINIDVODB_DB >= $DB:n) set MINIDVODB_DB = 0
@@ -605,10 +612,10 @@
       end
       book getpage MINIDVODB_ACTIVE 0 -var minidvodb_group -key STATE NEW
-
+      
       # Select different database
       $MINIDVODB_DB ++
       if ($MINIDVODB_DB >= $DB:n) set MINIDVODB_DB = 0
     end
-
+    book setword MINIDVODB_ACTIVE $minidvodb_group STATE DONE
     
     $run = addtool -listminidvodbrun -state new
