Index: trunk/ippTasks/camera.pro
===================================================================
--- trunk/ippTasks/camera.pro	(revision 14152)
+++ trunk/ippTasks/camera.pro	(revision 14153)
@@ -69,8 +69,10 @@
       option DEFAULT
       command camtool -pendingexp -limit 20
+      # echo command camtool -pendingexp -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$camera_DB
       command camtool -pendingexp -limit 20 -dbname $DB:$camera_DB
+      # echo command camtool -pendingexp -limit 20 -dbname $DB:$camera_DB
       $camera_DB ++
       if ($camera_DB >= $DB:n) set camera_DB = 0
@@ -81,5 +83,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout camPendingExp -key cam_id -uniq -setword dbname $options:0
+    ipptool2book stdout camPendingExp -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook camPendingExp
@@ -112,6 +114,6 @@
     if ($network == 0) break
     
-    # look for new images in camPendingExp (pantaskState == NULL)
-    book getpage camPendingExp 0 -var pageName -key pantaskState NULL
+    # look for new images in camPendingExp (pantaskState == INIT)
+    book getpage camPendingExp 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/chip.pro
===================================================================
--- trunk/ippTasks/chip.pro	(revision 14152)
+++ trunk/ippTasks/chip.pro	(revision 14153)
@@ -81,5 +81,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout chipPendingImfile -key chip_id:class_id -uniq -setword dbname $options:0
+    ipptool2book stdout chipPendingImfile -key chip_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook chipPendingImfile
@@ -112,6 +112,6 @@
     if ($network == 0) break
     
-    # look for new images in chipPendingImfile (pantaskState == NULL)
-    book getpage chipPendingImfile 0 -var pageName -key pantaskState NULL
+    # look for new images in chipPendingImfile (pantaskState == INIT)
+    book getpage chipPendingImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/detrend.norm.pro
===================================================================
--- trunk/ippTasks/detrend.norm.pro	(revision 14152)
+++ trunk/ippTasks/detrend.norm.pro	(revision 14153)
@@ -113,5 +113,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingNormStatImfile -key det_id:iteration -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingNormStatImfile -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingNormStatImfile
@@ -145,5 +145,5 @@
     
     # look for new images in detPendingNormStatImfile
-    book getpage detPendingNormStatImfile 0 -var pageName -key pantaskState NULL
+    book getpage detPendingNormStatImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
@@ -232,5 +232,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingNormImfile -key det_id:iteration -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingNormImfile -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingNormImfile
@@ -264,5 +264,5 @@
     
     # look for new images in detPendingNormImfile
-    book getpage detPendingNormImfile 0 -var pageName -key pantaskState NULL
+    book getpage detPendingNormImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
@@ -355,5 +355,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingNormExp -key det_id:iteration -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingNormExp -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingNormExp
@@ -387,5 +387,5 @@
     
     # look for new images in detPendingNormExp
-    book getpage detPendingNormExp 0 -var pageName -key pantaskState NULL
+    book getpage detPendingNormExp 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/detrend.process.pro
===================================================================
--- trunk/ippTasks/detrend.process.pro	(revision 14152)
+++ trunk/ippTasks/detrend.process.pro	(revision 14153)
@@ -100,5 +100,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingProcessedImfile -key det_id:exp_id:class_id -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingProcessedImfile -key det_id:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingProcessedImfile
@@ -132,5 +132,5 @@
     
     # look for new images in detPendingProcessedImfile
-    book getpage detPendingProcessedImfile 0 -var pageName -key pantaskState NULL
+    book getpage detPendingProcessedImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
@@ -232,5 +232,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingProcessedExp -key det_id:exp_id -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingProcessedExp -key det_id:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingProcessedExp
@@ -264,5 +264,5 @@
     
     # look for new exposures in detPendingProcessedExp
-    book getpage detPendingProcessedExp 0 -var pageName -key pantaskState NULL
+    book getpage detPendingProcessedExp 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/detrend.reject.pro
===================================================================
--- trunk/ippTasks/detrend.reject.pro	(revision 14152)
+++ trunk/ippTasks/detrend.reject.pro	(revision 14153)
@@ -81,5 +81,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detRejectExp -key det_id:iteration -uniq -setword dbname $options:0
+    ipptool2book stdout detRejectExp -key det_id:iteration -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detRejectExp
@@ -113,5 +113,5 @@
     
     # look for new images in detRejectExp
-    book getpage detRejectExp 0 -var pageName -key pantaskState NULL
+    book getpage detRejectExp 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/detrend.resid.pro
===================================================================
--- trunk/ippTasks/detrend.resid.pro	(revision 14152)
+++ trunk/ippTasks/detrend.resid.pro	(revision 14153)
@@ -97,5 +97,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingResidImfile -key det_id:iteration:exp_id:class_id -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingResidImfile -key det_id:iteration:exp_id:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingResidImfile
@@ -129,5 +129,5 @@
     
     # look for new images in detPendingResidImfile
-    book getpage detPendingResidImfile 0 -var pageName -key pantaskState NULL
+    book getpage detPendingResidImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
@@ -232,5 +232,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingResidExp -key det_id:iteration:exp_id -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingResidExp -key det_id:iteration:exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingResidExp
@@ -264,5 +264,5 @@
     
     # look for new images in detPendingResidExp
-    book getpage detPendingResidExp 0 -var pageName -key pantaskState NULL
+    book getpage detPendingResidExp 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/detrend.stack.pro
===================================================================
--- trunk/ippTasks/detrend.stack.pro	(revision 14152)
+++ trunk/ippTasks/detrend.stack.pro	(revision 14153)
@@ -82,5 +82,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout detPendingStackedImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0
+    ipptool2book stdout detPendingStackedImfile -key det_id:iteration:class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook detPendingStackedImfile
@@ -114,5 +114,5 @@
     
     # look for new images in detPendingStackedImfile
-    book getpage detPendingStackedImfile 0 -var pageName -key pantaskState NULL
+    book getpage detPendingStackedImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/diff.pro
===================================================================
--- trunk/ippTasks/diff.pro	(revision 14152)
+++ trunk/ippTasks/diff.pro	(revision 14153)
@@ -90,5 +90,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout diffSkyfile -key diff_id -uniq -setword dbname $options:0
+    ipptool2book stdout diffSkyfile -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook diffSkyfile
@@ -122,6 +122,6 @@
     if ($network == 0) break
     
-    # look for new images in diffSkyfile (pantaskState == NULL)
-    book getpage diffSkyfile 0 -var pageName -key pantaskState NULL
+    # look for new images in diffSkyfile (pantaskState == INIT)
+    book getpage diffSkyfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/mkdetrend.pro
===================================================================
--- trunk/ippTasks/mkdetrend.pro	(revision 14152)
+++ trunk/ippTasks/mkdetrend.pro	(revision 14153)
@@ -16,5 +16,5 @@
   end
   queueload detruns -x "cat $MODULES:0/$1"
-  ipptool2book detruns detRunDef -key detRunName -uniq
+  ipptool2book detruns detRunDef -key detRunName -uniq -setword pantaskState INIT
   queuedelete detruns
 end
@@ -35,5 +35,5 @@
 
     # how many detRunDefs are waiting to be started?
-    book npages detRunDef -var N -key pantaskState NULL
+    book npages detRunDef -var N -key pantaskState INIT
     # echo "detrun.launch N: $N"
     if ($N == 0) break
@@ -44,5 +44,5 @@
     # and for which the dependencies are done 
     for i 0 $N
-      book getpage detRunDef $i -var detRunName -key pantaskState NULL
+      book getpage detRunDef $i -var detRunName -key pantaskState INIT
       # echo "detrun.launch detRunName: $detRunName"
       if ("$detRunName" == "NULL") break 
Index: trunk/ippTasks/register.pro
===================================================================
--- trunk/ippTasks/register.pro	(revision 14152)
+++ trunk/ippTasks/register.pro	(revision 14153)
@@ -100,5 +100,5 @@
   task.exit $EXIT_SUCCESS
     # convert 'stdout' to book format
-    ipptool2book stdout regPendingImfile -key exp_id:tmp_class_id -uniq -setword dbname $options:0
+    ipptool2book stdout regPendingImfile -key exp_id:tmp_class_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook regPendingImfile
@@ -132,5 +132,5 @@
     
     # look for new images in regPendingImfile
-    book getpage regPendingImfile 0 -var pageName -key pantaskState NULL
+    book getpage regPendingImfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
@@ -214,5 +214,5 @@
   task.exit $EXIT_SUCCESS
     # convert 'stdout' to book format
-    ipptool2book stdout regPendingExp -key exp_id -uniq -setword dbname $options:0
+    ipptool2book stdout regPendingExp -key exp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook regPendingExp
@@ -245,6 +245,6 @@
     if ($network == 0) break
     
-    # look for new images in regPendingExp (pantaskState == NULL)
-    book getpage regPendingExp 0 -var pageName -key pantaskState NULL
+    # look for new images in regPendingExp (pantaskState == INIT)
+    book getpage regPendingExp 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/stack.pro
===================================================================
--- trunk/ippTasks/stack.pro	(revision 14152)
+++ trunk/ippTasks/stack.pro	(revision 14153)
@@ -90,5 +90,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout stackSumSkyfile -key stack_id -uniq -setword dbname $options:0
+    ipptool2book stdout stackSumSkyfile -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook stackSumSkyfile
@@ -122,6 +122,6 @@
     if ($network == 0) break
     
-    # look for new images in stackSumSkyfile (pantaskState == NULL)
-    book getpage stackSumSkyfile 0 -var pageName -key pantaskState NULL
+    # look for new images in stackSumSkyfile (pantaskState == INIT)
+    book getpage stackSumSkyfile 0 -var pageName -key pantaskState INIT
     if ($pageName == NULL) break
 
Index: trunk/ippTasks/warp.pro
===================================================================
--- trunk/ippTasks/warp.pro	(revision 14152)
+++ trunk/ippTasks/warp.pro	(revision 14153)
@@ -106,5 +106,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout warpInputExp -key warp_id -uniq -setword dbname $options:0
+    ipptool2book stdout warpInputExp -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook warpInputExp
@@ -138,6 +138,6 @@
     if ($network == 0) break
     
-    # look for new images in warpInputExp (pantaskState == NULL)
-    book getpage warpInputExp 0 -var pageName -key pantaskState NULL
+    # look for new images in warpInputExp (pantaskState == INIT)
+    book getpage warpInputExp 0 -var pageName -key pantaskState INIT
     if ("$pageName" == "NULL") break
 
@@ -226,5 +226,5 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout warpPendingSkyCell -key warp_id:skycell_id:tess_id -uniq -setword dbname $options:0
+    ipptool2book stdout warpPendingSkyCell -key warp_id:skycell_id:tess_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
       book listbook warpPendingSkyCell
@@ -258,6 +258,6 @@
     if ($network == 0) break
     
-    # look for new images in warpPendingSkyCell (pantaskState == NULL)
-    book getpage warpPendingSkyCell 0 -var pageName -key pantaskState NULL
+    # look for new images in warpPendingSkyCell (pantaskState == INIT)
+    book getpage warpPendingSkyCell 0 -var pageName -key pantaskState INIT
     if ("$pageName" == "NULL") break
 
