Index: trunk/ippTasks/camera.pro
===================================================================
--- trunk/ippTasks/camera.pro	(revision 24554)
+++ trunk/ippTasks/camera.pro	(revision 24595)
@@ -7,14 +7,14 @@
 
 book init camPendingExp
-book init camPendingCleanup
+#book init camPendingCleanup
 
 macro camera.status
   book listbook camPendingExp
-  book listbook camPendingCleanup
+#  book listbook camPendingCleanup
 end
 
 macro camera.reset
   book init camPendingExp
-  book init camPendingCleanup
+#  book init camPendingCleanup
 end
 
@@ -37,21 +37,21 @@
 end
 
-macro camera.cleanup.on
-  task camera.cleanup.load
-    active true
-  end
-  task camera.cleanup.run
-    active true
-  end
-end
-
-macro camera.cleanup.off
-  task camera.cleanup.load
-    active false
-  end
-  task camera.cleanup.run
-    active false
-  end
-end
+# macro camera.cleanup.on
+#   task camera.cleanup.load
+#     active true
+#   end
+#   task camera.cleanup.run
+#     active true
+#   end
+# end
+
+# macro camera.cleanup.off
+#   task camera.cleanup.load
+#     active false
+#   end
+#   task camera.cleanup.run
+#     active false
+#   end
+# end
 
 # this variable will cycle through the known database names
@@ -199,122 +199,122 @@
 end
 
-# this variable will cycle through the known database names
-$camera_cleanup_DB = 0
-
-# select images ready for cam analysis
-# new entries are added to camPendingImfile
-# skip already-present entries
-task	       camera.cleanup.load
-  host         local
-
-  periods      -poll $LOADPOLL
-  periods      -exec $LOADEXEC
-  periods      -timeout 30
-  npending     1
-  active       false
-
-  stdout NULL
-  stderr $LOGDIR/camera.cleanup.log
-
-  task.exec
-    if ($LABEL:n == 0) break
-    $run = camtool -pendingcleanuprun
-    if ($DB:n == 0)
-      option DEFAULT
-    else
-      # save the DB name for the exit tasks
-      option $DB:$camera_cleanup_DB
-      $run = $run -dbname $DB:$camera_cleanup_DB
-      $camera_cleanup_DB ++
-      if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0
-    end
-    add_poll_args run
-    add_poll_labels run
-    command $run
-  end
-
-  # success
-  task.exit    0
-    # convert 'stdout' to book format
-    ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-    if ($VERBOSE > 2)
-      book listbook camPendingCleanup
-    end
-
-    # delete existing entries in the appropriate pantaskStates
-    process_cleanup camPendingCleanup
-  end
-
-  # locked list
-  task.exit    default
-    showcommand failure
-  end
-
-  task.exit    crash
-    showcommand crash
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand timeout
-  end
-end
-
-# run the ipp_cleanup.pl script on pending images
-task	       camera.cleanup.run
-  periods      -poll $RUNPOLL
-  periods      -exec $RUNEXEC
-  periods      -timeout 60
-  active       false
-
-  task.exec
-    book npages camPendingCleanup -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+# # this variable will cycle through the known database names
+# $camera_cleanup_DB = 0
+
+# # select images ready for cam analysis
+# # new entries are added to camPendingImfile
+# # skip already-present entries
+# task	       camera.cleanup.load
+#   host         local
+
+#   periods      -poll $LOADPOLL
+#   periods      -exec $LOADEXEC
+#   periods      -timeout 30
+#   npending     1
+#   active       false
+
+#   stdout NULL
+#   stderr $LOGDIR/camera.cleanup.log
+
+#   task.exec
+#     if ($LABEL:n == 0) break
+#     $run = camtool -pendingcleanuprun
+#     if ($DB:n == 0)
+#       option DEFAULT
+#     else
+#       # save the DB name for the exit tasks
+#       option $DB:$camera_cleanup_DB
+#       $run = $run -dbname $DB:$camera_cleanup_DB
+#       $camera_cleanup_DB ++
+#       if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0
+#     end
+#     add_poll_args run
+#     add_poll_labels run
+#     command $run
+#   end
+
+#   # success
+#   task.exit    0
+#     # convert 'stdout' to book format
+#     ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+#     if ($VERBOSE > 2)
+#       book listbook camPendingCleanup
+#     end
+
+#     # delete existing entries in the appropriate pantaskStates
+#     process_cleanup camPendingCleanup
+#   end
+
+#   # locked list
+#   task.exit    default
+#     showcommand failure
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#   end
+
+#   # operation times out?
+#   task.exit    timeout
+#     showcommand timeout
+#   end
+# end
+
+# # run the ipp_cleanup.pl script on pending images
+# task	       camera.cleanup.run
+#   periods      -poll $RUNPOLL
+#   periods      -exec $RUNEXEC
+#   periods      -timeout 60
+#   active       false
+
+#   task.exec
+#     book npages camPendingCleanup -var N
+#     if ($N == 0) break
+#     if ($NETWORK == 0) break
     
-    # look for new images in camPendingCleanup (pantaskState == INIT)
-    book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT
-    if ("$pageName" == "NULL") break
-
-    book setword camPendingCleanup $pageName pantaskState RUN
-    book getword camPendingCleanup $pageName camera -var CAMERA
-    book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
-    book getword camPendingCleanup $pageName cam_id -var CAM_ID
-    book getword camPendingCleanup $pageName dbname -var DBNAME
-
-    # specify choice of local or remote host based on camera and cam (class_id)
-    set.host.for.camera $CAMERA FPA
-
-    stdout $LOGDIR/camera.cleanup.log
-    stderr $LOGDIR/camera.cleanup.log
-
-    # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
-    add_standard_args run
-
-    # save the pageName for future reference below
-    options $pageName
-
-    # create the command line
-    if ($VERBOSE > 1)
-      echo command $run
-    end
-    command $run
-  end
-
-  # default exit status
-  task.exit    default
-    process_exit camPendingCleanup $options:0 $JOB_STATUS
-  end
-
-  task.exit    crash
-    showcommand crash
-    book setword camPendingCleanup $options:0 pantaskState CRASH
-  end
-
-  # operation timed out?
-  task.exit    timeout
-    showcommand timeout
-    book setword camPendingCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+#     # look for new images in camPendingCleanup (pantaskState == INIT)
+#     book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT
+#     if ("$pageName" == "NULL") break
+
+#     book setword camPendingCleanup $pageName pantaskState RUN
+#     book getword camPendingCleanup $pageName camera -var CAMERA
+#     book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
+#     book getword camPendingCleanup $pageName cam_id -var CAM_ID
+#     book getword camPendingCleanup $pageName dbname -var DBNAME
+
+#     # specify choice of local or remote host based on camera and cam (class_id)
+#     set.host.for.camera $CAMERA FPA
+
+#     stdout $LOGDIR/camera.cleanup.log
+#     stderr $LOGDIR/camera.cleanup.log
+
+#     # XXX is everything listed here needed?
+#     $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
+#     add_standard_args run
+
+#     # save the pageName for future reference below
+#     options $pageName
+
+#     # create the command line
+#     if ($VERBOSE > 1)
+#       echo command $run
+#     end
+#     command $run
+#   end
+
+#   # default exit status
+#   task.exit    default
+#     process_exit camPendingCleanup $options:0 $JOB_STATUS
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#     book setword camPendingCleanup $options:0 pantaskState CRASH
+#   end
+
+#   # operation timed out?
+#   task.exit    timeout
+#     showcommand timeout
+#     book setword camPendingCleanup $options:0 pantaskState TIMEOUT
+#   end
+# end
Index: trunk/ippTasks/chip.pro
===================================================================
--- trunk/ippTasks/chip.pro	(revision 24554)
+++ trunk/ippTasks/chip.pro	(revision 24595)
@@ -10,14 +10,14 @@
 
 book init chipPendingImfile
-book init chipPendingCleanup
+#book init chipPendingCleanup
 
 macro chip.status
   book listbook chipPendingImfile
-  book listbook chipPendingCleanup
+#  book listbook chipPendingCleanup
 end
 
 macro chip.reset
   book init chipPendingImfile
-  book init chipPendingCleanup
+#  book init chipPendingCleanup
 end
 
@@ -46,21 +46,21 @@
 end
 
-macro chip.cleanup.on
-  task chip.cleanup.load
-    active true
-  end
-  task chip.cleanup.run
-    active true
-  end
-end
-
-macro chip.cleanup.off
-  task chip.cleanup.load
-    active false
-  end
-  task chip.cleanup.run
-    active false
-  end
-end
+# macro chip.cleanup.on
+#   task chip.cleanup.load
+#     active true
+#   end
+#   task chip.cleanup.run
+#     active true
+#   end
+# end
+
+# macro chip.cleanup.off
+#   task chip.cleanup.load
+#     active false
+#   end
+#   task chip.cleanup.run
+#     active false
+#   end
+# end
 
 # this variable will cycle through the known database names
@@ -273,122 +273,122 @@
 end
 
-# this variable will cycle through the known database names
-$chip_cleanup_DB = 0
-
-# select images ready for chip analysis
-# new entries are added to chipPendingImfile
-# skip already-present entries
-task	       chip.cleanup.load
-  host         local
-
-  periods      -poll $LOADPOLL
-  periods      -exec $LOADEXEC
-  periods      -timeout 30
-  npending     1
-  active       false
-
-  stdout NULL
-  stderr $LOGDIR/chip.cleanup.log
-
-  task.exec
-    if ($LABEL:n == 0) break
-    $run = chiptool -pendingcleanuprun
-    if ($DB:n == 0)
-      option DEFAULT
-    else
-      # save the DB name for the exit tasks
-      option $DB:$chip_cleanup_DB
-      $run = $run -dbname $DB:$chip_cleanup_DB
-      $chip_cleanup_DB ++
-      if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0
-    end
-    add_poll_args run
-    add_poll_labels run
-    command $run
-  end
-
-  # success
-  task.exit    0
-    # convert 'stdout' to book format
-    ipptool2book stdout chipPendingCleanup -key chip_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-    if ($VERBOSE > 2)
-      book listbook chipPendingCleanup
-    end
-
-    # delete existing entries in the appropriate pantaskStates
-    process_cleanup chipPendingCleanup
-  end
-
-  # locked list
-  task.exit    default
-    showcommand failure
-  end
-
-  task.exit    crash
-    showcommand crash
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand timeout
-  end
-end
-
-# run the ipp_cleanup.pl script on pending images
-task	       chip.cleanup.run
-  periods      -poll $RUNPOLL
-  periods      -exec $RUNEXEC
-  periods      -timeout 60
-  active       false
-
-  task.exec
-    book npages chipPendingCleanup -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+# # this variable will cycle through the known database names
+# $chip_cleanup_DB = 0
+
+# # select images ready for chip analysis
+# # new entries are added to chipPendingImfile
+# # skip already-present entries
+# task	       chip.cleanup.load
+#   host         local
+
+#   periods      -poll $LOADPOLL
+#   periods      -exec $LOADEXEC
+#   periods      -timeout 30
+#   npending     1
+#   active       false
+
+#   stdout NULL
+#   stderr $LOGDIR/chip.cleanup.log
+
+#   task.exec
+#     if ($LABEL:n == 0) break
+#     $run = chiptool -pendingcleanuprun
+#     if ($DB:n == 0)
+#       option DEFAULT
+#     else
+#       # save the DB name for the exit tasks
+#       option $DB:$chip_cleanup_DB
+#       $run = $run -dbname $DB:$chip_cleanup_DB
+#       $chip_cleanup_DB ++
+#       if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0
+#     end
+#     add_poll_args run
+#     add_poll_labels run
+#     command $run
+#   end
+
+#   # success
+#   task.exit    0
+#     # convert 'stdout' to book format
+#     ipptool2book stdout chipPendingCleanup -key chip_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+#     if ($VERBOSE > 2)
+#       book listbook chipPendingCleanup
+#     end
+
+#     # delete existing entries in the appropriate pantaskStates
+#     process_cleanup chipPendingCleanup
+#   end
+
+#   # locked list
+#   task.exit    default
+#     showcommand failure
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#   end
+
+#   # operation times out?
+#   task.exit    timeout
+#     showcommand timeout
+#   end
+# end
+
+# # run the ipp_cleanup.pl script on pending images
+# task	       chip.cleanup.run
+#   periods      -poll $RUNPOLL
+#   periods      -exec $RUNEXEC
+#   periods      -timeout 60
+#   active       false
+
+#   task.exec
+#     book npages chipPendingCleanup -var N
+#     if ($N == 0) break
+#     if ($NETWORK == 0) break
     
-    # look for new images in chipPendingCleanup (pantaskState == INIT)
-    book getpage chipPendingCleanup 0 -var pageName -key pantaskState INIT
-    if ("$pageName" == "NULL") break
-
-    book setword chipPendingCleanup $pageName pantaskState RUN
-    book getword chipPendingCleanup $pageName camera -var CAMERA
-    book getword chipPendingCleanup $pageName state -var CLEANUP_MODE
-    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
-    book getword chipPendingCleanup $pageName dbname -var DBNAME
-
-    # specify choice of local or remote host based on camera and chip (class_id)
-    set.host.for.camera $CAMERA FPA
-
-    stdout $LOGDIR/chip.cleanup.log
-    stderr $LOGDIR/chip.cleanup.log
-
-    # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
-    add_standard_args run
-
-    # save the pageName for future reference below
-    options $pageName
-
-    # create the command line
-    if ($VERBOSE > 1)
-      echo command $run
-    end
-    command $run
-  end
-
-  # default exit status
-  task.exit    default
-    process_exit chipPendingCleanup $options:0 $JOB_STATUS
-  end
-
-  task.exit    crash
-    showcommand crash
-    book setword chipPendingCleanup $options:0 pantaskState CRASH
-  end
-
-  # operation timed out?
-  task.exit    timeout
-    showcommand timeout
-    book setword chipPendingCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+#     # look for new images in chipPendingCleanup (pantaskState == INIT)
+#     book getpage chipPendingCleanup 0 -var pageName -key pantaskState INIT
+#     if ("$pageName" == "NULL") break
+
+#     book setword chipPendingCleanup $pageName pantaskState RUN
+#     book getword chipPendingCleanup $pageName camera -var CAMERA
+#     book getword chipPendingCleanup $pageName state -var CLEANUP_MODE
+#     book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
+#     book getword chipPendingCleanup $pageName dbname -var DBNAME
+
+#     # specify choice of local or remote host based on camera and chip (class_id)
+#     set.host.for.camera $CAMERA FPA
+
+#     stdout $LOGDIR/chip.cleanup.log
+#     stderr $LOGDIR/chip.cleanup.log
+
+#     # XXX is everything listed here needed?
+#     $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
+#     add_standard_args run
+
+#     # save the pageName for future reference below
+#     options $pageName
+
+#     # create the command line
+#     if ($VERBOSE > 1)
+#       echo command $run
+#     end
+#     command $run
+#   end
+
+#   # default exit status
+#   task.exit    default
+#     process_exit chipPendingCleanup $options:0 $JOB_STATUS
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#     book setword chipPendingCleanup $options:0 pantaskState CRASH
+#   end
+
+#   # operation timed out?
+#   task.exit    timeout
+#     showcommand timeout
+#     book setword chipPendingCleanup $options:0 pantaskState TIMEOUT
+#   end
+# end
Index: trunk/ippTasks/diff.pro
===================================================================
--- trunk/ippTasks/diff.pro	(revision 24554)
+++ trunk/ippTasks/diff.pro	(revision 24595)
@@ -10,14 +10,14 @@
 ### Initialise the books containing the tasks to do
 book init diffSkyfile
-book init diffCleanup
+#book init diffCleanup
 
 ### Database lists
 $diffSkycell_DB = 0
-$diffCleanup_DB = 0
+#$diffCleanup_DB = 0
 
 ### Check status of diffing tasks
 macro diff.status
   book listbook diffSkyfile
-  book listbook diffCleanup
+#  book listbook diffCleanup
 end
 
@@ -25,5 +25,5 @@
 macro diff.reset
   book init diffSkyfile
-  book init diffCleanup
+#  book init diffCleanup
 end
 
@@ -48,21 +48,21 @@
 end
 
-macro diff.cleanup.on
-  task diff.cleanup.load
-    active true
-  end
-  task diff.cleanup.run
-    active true
-  end
-end
-
-macro diff.cleanup.off
-  task diff.cleanup.load
-    active false
-  end
-  task diff.cleanup.run
-    active false
-  end
-end
+# macro diff.cleanup.on
+#   task diff.cleanup.load
+#     active true
+#   end
+#   task diff.cleanup.run
+#     active true
+#   end
+# end
+
+# macro diff.cleanup.off
+#   task diff.cleanup.load
+#     active false
+#   end
+#   task diff.cleanup.run
+#     active false
+#   end
+# end
 
 
@@ -199,119 +199,119 @@
 end
 
-# select images ready for diff analysis
-# new entries are added to diffPendingImfile
-# skip already-present entries
-task	       diff.cleanup.load
-  host         local
-
-  periods      -poll $LOADPOLL
-  periods      -exec $LOADEXEC
-  periods      -timeout 30
-  npending     1
-  active       false
-
-  stdout NULL
-  stderr $LOGDIR/diff.cleanup.log
-
-  task.exec
-    if ($LABEL:n == 0) break
-    $run = difftool -pendingcleanuprun
-    if ($DB:n == 0)
-      option DEFAULT
-    else
-      # save the DB name for the exit tasks
-      option $DB:$diffCleanup_DB
-      $run = $run -dbname $DB:$diffCleanup_DB
-      $diffCleanup_DB ++
-      if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0
-    end
-    add_poll_args run
-    add_poll_labels run
-    command $run
-  end
-
-  # success
-  task.exit    0
-    # convert 'stdout' to book format
-    ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-    if ($VERBOSE > 2)
-      book listbook diffCleanup
-    end
-
-    # delete existing entries in the appropriate pantaskStates
-    process_cleanup diffCleanup
-  end
-
-  # locked list
-  task.exit    default
-    showcommand failure
-  end
-
-  task.exit    crash
-    showcommand crash
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand timeout
-  end
-end
-
-# run the ipp_cleanup.pl script on pending images
-task	       diff.cleanup.run
-  periods      -poll $RUNPOLL
-  periods      -exec $RUNEXEC
-  periods      -timeout 60
-  active       false
-
-  task.exec
-    book npages diffCleanup -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+# # select images ready for diff analysis
+# # new entries are added to diffPendingImfile
+# # skip already-present entries
+# task	       diff.cleanup.load
+#   host         local
+
+#   periods      -poll $LOADPOLL
+#   periods      -exec $LOADEXEC
+#   periods      -timeout 30
+#   npending     1
+#   active       false
+
+#   stdout NULL
+#   stderr $LOGDIR/diff.cleanup.log
+
+#   task.exec
+#     if ($LABEL:n == 0) break
+#     $run = difftool -pendingcleanuprun
+#     if ($DB:n == 0)
+#       option DEFAULT
+#     else
+#       # save the DB name for the exit tasks
+#       option $DB:$diffCleanup_DB
+#       $run = $run -dbname $DB:$diffCleanup_DB
+#       $diffCleanup_DB ++
+#       if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0
+#     end
+#     add_poll_args run
+#     add_poll_labels run
+#     command $run
+#   end
+
+#   # success
+#   task.exit    0
+#     # convert 'stdout' to book format
+#     ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+#     if ($VERBOSE > 2)
+#       book listbook diffCleanup
+#     end
+
+#     # delete existing entries in the appropriate pantaskStates
+#     process_cleanup diffCleanup
+#   end
+
+#   # locked list
+#   task.exit    default
+#     showcommand failure
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#   end
+
+#   # operation times out?
+#   task.exit    timeout
+#     showcommand timeout
+#   end
+# end
+
+# # run the ipp_cleanup.pl script on pending images
+# task	       diff.cleanup.run
+#   periods      -poll $RUNPOLL
+#   periods      -exec $RUNEXEC
+#   periods      -timeout 60
+#   active       false
+
+#   task.exec
+#     book npages diffCleanup -var N
+#     if ($N == 0) break
+#     if ($NETWORK == 0) break
     
-    # look for new images in diffCleanup (pantaskState == INIT)
-    book getpage diffCleanup 0 -var pageName -key pantaskState INIT
-    if ("$pageName" == "NULL") break
-
-    book setword diffCleanup $pageName pantaskState RUN
-    book getword diffCleanup $pageName camera -var CAMERA
-    book getword diffCleanup $pageName state -var CLEANUP_MODE
-    book getword diffCleanup $pageName diff_id -var DIFF_ID
-    book getword diffCleanup $pageName dbname -var DBNAME
-
-    # specify choice of local or remote host based on camera and diff (class_id)
-    set.host.for.camera $CAMERA FPA
-
-    stdout $LOGDIR/diff.cleanup.log
-    stderr $LOGDIR/diff.cleanup.log
-
-    # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
-    add_standard_args run
-
-    # save the pageName for future reference below
-    options $pageName
-
-    # create the command line
-    if ($VERBOSE > 1)
-      echo command $run
-    end
-    command $run
-  end
-
-  # default exit status
-  task.exit    default
-    process_exit diffCleanup $options:0 $JOB_STATUS
-  end
-
-  task.exit    crash
-    showcommand crash
-    book setword diffCleanup $options:0 pantaskState CRASH
-  end
-
-  # operation timed out?
-  task.exit    timeout
-    showcommand timeout
-    book setword diffCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+#     # look for new images in diffCleanup (pantaskState == INIT)
+#     book getpage diffCleanup 0 -var pageName -key pantaskState INIT
+#     if ("$pageName" == "NULL") break
+
+#     book setword diffCleanup $pageName pantaskState RUN
+#     book getword diffCleanup $pageName camera -var CAMERA
+#     book getword diffCleanup $pageName state -var CLEANUP_MODE
+#     book getword diffCleanup $pageName diff_id -var DIFF_ID
+#     book getword diffCleanup $pageName dbname -var DBNAME
+
+#     # specify choice of local or remote host based on camera and diff (class_id)
+#     set.host.for.camera $CAMERA FPA
+
+#     stdout $LOGDIR/diff.cleanup.log
+#     stderr $LOGDIR/diff.cleanup.log
+
+#     # XXX is everything listed here needed?
+#     $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
+#     add_standard_args run
+
+#     # save the pageName for future reference below
+#     options $pageName
+
+#     # create the command line
+#     if ($VERBOSE > 1)
+#       echo command $run
+#     end
+#     command $run
+#   end
+
+#   # default exit status
+#   task.exit    default
+#     process_exit diffCleanup $options:0 $JOB_STATUS
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#     book setword diffCleanup $options:0 pantaskState CRASH
+#   end
+
+#   # operation timed out?
+#   task.exit    timeout
+#     showcommand timeout
+#     book setword diffCleanup $options:0 pantaskState TIMEOUT
+#   end
+# end
Index: trunk/ippTasks/fake.pro
===================================================================
--- trunk/ippTasks/fake.pro	(revision 24554)
+++ trunk/ippTasks/fake.pro	(revision 24595)
@@ -7,14 +7,14 @@
 
 book init fakePendingImfile
-book init fakePendingCleanup
+#book init fakePendingCleanup
 
 macro fake.status
   book listbook fakePendingImfile
-  book listbook fakePendingCleanup
+#  book listbook fakePendingCleanup
 end
 
 macro fake.reset
   book init fakePendingImfile
-  book init fakePendingCleanup
+#  book init fakePendingCleanup
 end
 
@@ -43,21 +43,21 @@
 end
 
-macro fake.cleanup.on
-  task fake.cleanup.load
-    active true
-  end
-  task fake.cleanup.run
-    active true
-  end
-end
-
-macro fake.cleanup.off
-  task fake.cleanup.load
-    active false
-  end
-  task fake.cleanup.run
-    active false
-  end
-end
+# macro fake.cleanup.on
+#   task fake.cleanup.load
+#     active true
+#   end
+#   task fake.cleanup.run
+#     active true
+#   end
+# end
+
+# macro fake.cleanup.off
+#   task fake.cleanup.load
+#     active false
+#   end
+#   task fake.cleanup.run
+#     active false
+#   end
+# end
 
 # this variable will cycle through the known database names
@@ -249,123 +249,123 @@
 end
 
-# this variable will cycle through the known database names
-$fake_cleanup_DB = 0
-
-# select images ready for fake analysis
-# new entries are added to fakePendingImfile
-# skip already-present entries
-task	       fake.cleanup.load
-  host         local
-
-  periods      -poll $LOADPOLL
-  periods      -exec $LOADEXEC
-  periods      -timeout 30
-  npending     1
-  active       false
-
-  stdout NULL
-  stderr $LOGDIR/fake.cleanup.log
-
-  task.exec
-    if ($LABEL:n == 0) break
-    $run = faketool -pendingcleanuprun
-    if ($DB:n == 0)
-      option DEFAULT
-      command 
-    else
-      # save the DB name for the exit tasks
-      option $DB:$fake_cleanup_DB
-      $run = $run -dbname $DB:$fake_cleanup_DB
-      $fake_cleanup_DB ++
-      if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0
-    end
-    add_poll_args run
-    add_poll_labels run
-    command $run
-  end
-
-  # success
-  task.exit    0
-    # convert 'stdout' to book format
-    ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-    if ($VERBOSE > 2)
-      book listbook fakePendingCleanup
-    end
-
-    # delete existing entries in the appropriate pantaskStates
-    process_cleanup fakePendingCleanup
-  end
-
-  # locked list
-  task.exit    default
-    showcommand failure
-  end
-
-  task.exit    crash
-    showcommand crash
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand timeout
-  end
-end
-
-# run the ipp_cleanup.pl script on pending images
-task	       fake.cleanup.run
-  periods      -poll $RUNPOLL
-  periods      -exec $RUNEXEC
-  periods      -timeout 60
-  active       false
-
-  task.exec
-    book npages fakePendingCleanup -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+# # this variable will cycle through the known database names
+# $fake_cleanup_DB = 0
+
+# # select images ready for fake analysis
+# # new entries are added to fakePendingImfile
+# # skip already-present entries
+# task	       fake.cleanup.load
+#   host         local
+
+#   periods      -poll $LOADPOLL
+#   periods      -exec $LOADEXEC
+#   periods      -timeout 30
+#   npending     1
+#   active       false
+
+#   stdout NULL
+#   stderr $LOGDIR/fake.cleanup.log
+
+#   task.exec
+#     if ($LABEL:n == 0) break
+#     $run = faketool -pendingcleanuprun
+#     if ($DB:n == 0)
+#       option DEFAULT
+#       command 
+#     else
+#       # save the DB name for the exit tasks
+#       option $DB:$fake_cleanup_DB
+#       $run = $run -dbname $DB:$fake_cleanup_DB
+#       $fake_cleanup_DB ++
+#       if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0
+#     end
+#     add_poll_args run
+#     add_poll_labels run
+#     command $run
+#   end
+
+#   # success
+#   task.exit    0
+#     # convert 'stdout' to book format
+#     ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+#     if ($VERBOSE > 2)
+#       book listbook fakePendingCleanup
+#     end
+
+#     # delete existing entries in the appropriate pantaskStates
+#     process_cleanup fakePendingCleanup
+#   end
+
+#   # locked list
+#   task.exit    default
+#     showcommand failure
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#   end
+
+#   # operation times out?
+#   task.exit    timeout
+#     showcommand timeout
+#   end
+# end
+
+# # run the ipp_cleanup.pl script on pending images
+# task	       fake.cleanup.run
+#   periods      -poll $RUNPOLL
+#   periods      -exec $RUNEXEC
+#   periods      -timeout 60
+#   active       false
+
+#   task.exec
+#     book npages fakePendingCleanup -var N
+#     if ($N == 0) break
+#     if ($NETWORK == 0) break
     
-    # look for new images in fakePendingCleanup (pantaskState == INIT)
-    book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT
-    if ("$pageName" == "NULL") break
-
-    book setword fakePendingCleanup $pageName pantaskState RUN
-    book getword fakePendingCleanup $pageName camera -var CAMERA
-    book getword fakePendingCleanup $pageName state -var CLEANUP_MODE
-    book getword fakePendingCleanup $pageName fake_id -var FAKE_ID
-    book getword fakePendingCleanup $pageName dbname -var DBNAME
-
-    # specify choice of local or remote host based on camera and fake (class_id)
-    set.host.for.camera $CAMERA FPA
-
-    stdout $LOGDIR/fake.cleanup.log
-    stderr $LOGDIR/fake.cleanup.log
-
-    # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE
-    add_standard_args run
-
-    # save the pageName for future reference below
-    options $pageName
-
-    # create the command line
-    if ($VERBOSE > 1)
-      echo command $run
-    end
-    command $run
-  end
-
-  # default exit status
-  task.exit    default
-    process_exit fakePendingCleanup $options:0 $JOB_STATUS
-  end
-
-  task.exit    crash
-    showcommand crash
-    book setword fakePendingCleanup $options:0 pantaskState CRASH
-  end
-
-  # operation timed out?
-  task.exit    timeout
-    showcommand timeout
-    book setword fakePendingCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+#     # look for new images in fakePendingCleanup (pantaskState == INIT)
+#     book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT
+#     if ("$pageName" == "NULL") break
+
+#     book setword fakePendingCleanup $pageName pantaskState RUN
+#     book getword fakePendingCleanup $pageName camera -var CAMERA
+#     book getword fakePendingCleanup $pageName state -var CLEANUP_MODE
+#     book getword fakePendingCleanup $pageName fake_id -var FAKE_ID
+#     book getword fakePendingCleanup $pageName dbname -var DBNAME
+
+#     # specify choice of local or remote host based on camera and fake (class_id)
+#     set.host.for.camera $CAMERA FPA
+
+#     stdout $LOGDIR/fake.cleanup.log
+#     stderr $LOGDIR/fake.cleanup.log
+
+#     # XXX is everything listed here needed?
+#     $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE
+#     add_standard_args run
+
+#     # save the pageName for future reference below
+#     options $pageName
+
+#     # create the command line
+#     if ($VERBOSE > 1)
+#       echo command $run
+#     end
+#     command $run
+#   end
+
+#   # default exit status
+#   task.exit    default
+#     process_exit fakePendingCleanup $options:0 $JOB_STATUS
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#     book setword fakePendingCleanup $options:0 pantaskState CRASH
+#   end
+
+#   # operation timed out?
+#   task.exit    timeout
+#     showcommand timeout
+#     book setword fakePendingCleanup $options:0 pantaskState TIMEOUT
+#   end
+# end
Index: trunk/ippTasks/science.cleanup.pro
===================================================================
--- trunk/ippTasks/science.cleanup.pro	(revision 24595)
+++ trunk/ippTasks/science.cleanup.pro	(revision 24595)
@@ -0,0 +1,923 @@
+## science.cleanup.pro : -*- sh -*-
+
+macro science.cleanup.on
+    chip.cleanup.on
+    camera.cleanup.on
+    fake.cleanup.on
+    warp.cleanup.on
+    diff.cleanup.on
+    stack.cleanup.on
+end
+
+check.globals
+
+## chip.cleanup.pro : -*- sh -*-
+
+book init chipPendingCleanup
+
+macro chip.cleanup.status
+  book listbook chipPendingCleanup
+end
+
+macro chip.cleanup.reset
+  book init chipPendingCleanup
+end
+
+macro chip.cleanup.on
+  task chip.cleanup.load
+    active true
+  end
+  task chip.cleanup.run
+    active true
+  end
+end
+
+macro chip.cleanup.off
+  task chip.cleanup.load
+    active false
+  end
+  task chip.cleanup.run
+    active false
+  end
+end
+
+# this variable will cycle through the known database names
+$chip_cleanup_DB = 0
+
+# select images ready for chip analysis
+# new entries are added to chipPendingImfile
+# skip already-present entries
+task	       chip.cleanup.load
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
+  periods      -timeout 30
+  npending     1
+  active       false
+
+  stdout NULL
+  stderr $LOGDIR/chip.cleanup.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = chiptool -pendingcleanuprun
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$chip_cleanup_DB
+      $run = $run -dbname $DB:$chip_cleanup_DB
+      $chip_cleanup_DB ++
+      if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0
+    end
+    add_poll_args run
+    add_poll_labels run
+    command $run
+  end
+
+  # success
+  task.exit    0
+    # convert 'stdout' to book format
+    ipptool2book stdout chipPendingCleanup -key chip_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    if ($VERBOSE > 2)
+      book listbook chipPendingCleanup
+    end
+
+    # delete existing entries in the appropriate pantaskStates
+    process_cleanup chipPendingCleanup
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+# run the ipp_cleanup.pl script on pending images
+task	       chip.cleanup.run
+  periods      -poll $RUNPOLL
+  periods      -exec $RUNEXEC
+  periods      -timeout 60
+  active       false
+
+  task.exec
+    book npages chipPendingCleanup -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new images in chipPendingCleanup (pantaskState == INIT)
+    book getpage chipPendingCleanup 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword chipPendingCleanup $pageName pantaskState RUN
+    book getword chipPendingCleanup $pageName camera -var CAMERA
+    book getword chipPendingCleanup $pageName state -var CLEANUP_MODE
+    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
+    book getword chipPendingCleanup $pageName dbname -var DBNAME
+
+    # specify choice of local or remote host based on camera and chip (class_id)
+    set.host.for.camera $CAMERA FPA
+
+    stdout $LOGDIR/chip.cleanup.log
+    stderr $LOGDIR/chip.cleanup.log
+
+    # XXX is everything listed here needed?
+    $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
+    add_standard_args run
+
+    # save the pageName for future reference below
+    options $pageName
+
+    # create the command line
+    if ($VERBOSE > 1)
+      echo command $run
+    end
+    command $run
+  end
+
+  # default exit status
+  task.exit    default
+    process_exit chipPendingCleanup $options:0 $JOB_STATUS
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword chipPendingCleanup $options:0 pantaskState CRASH
+  end
+
+  # operation timed out?
+  task.exit    timeout
+    showcommand timeout
+    book setword chipPendingCleanup $options:0 pantaskState TIMEOUT
+  end
+end
+
+## camera.cleanup.pro
+
+book init camPendingCleanup
+
+macro camera.cleanup.status
+  book listbook camPendingCleanup
+end
+
+macro camera.cleanup.reset
+  book init camPendingCleanup
+end
+
+macro camera.cleanup.on
+  task camera.cleanup.load
+    active true
+  end
+  task camera.cleanup.run
+    active true
+  end
+end
+
+macro camera.cleanup.off
+  task camera.cleanup.load
+    active false
+  end
+  task camera.cleanup.run
+    active false
+  end
+end
+
+# this variable will cycle through the known database names
+$camera_cleanup_DB = 0
+
+# select images ready for cam analysis
+# new entries are added to camPendingImfile
+# skip already-present entries
+task	       camera.cleanup.load
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
+  periods      -timeout 30
+  npending     1
+  active       false
+
+  stdout NULL
+  stderr $LOGDIR/camera.cleanup.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = camtool -pendingcleanuprun
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$camera_cleanup_DB
+      $run = $run -dbname $DB:$camera_cleanup_DB
+      $camera_cleanup_DB ++
+      if ($camera_cleanup_DB >= $DB:n) set camera_cleanup_DB = 0
+    end
+    add_poll_args run
+    add_poll_labels run
+    command $run
+  end
+
+  # success
+  task.exit    0
+    # convert 'stdout' to book format
+    ipptool2book stdout camPendingCleanup -key cam_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    if ($VERBOSE > 2)
+      book listbook camPendingCleanup
+    end
+
+    # delete existing entries in the appropriate pantaskStates
+    process_cleanup camPendingCleanup
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+# run the ipp_cleanup.pl script on pending images
+task	       camera.cleanup.run
+  periods      -poll $RUNPOLL
+  periods      -exec $RUNEXEC
+  periods      -timeout 60
+  active       false
+
+  task.exec
+    book npages camPendingCleanup -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new images in camPendingCleanup (pantaskState == INIT)
+    book getpage camPendingCleanup 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword camPendingCleanup $pageName pantaskState RUN
+    book getword camPendingCleanup $pageName camera -var CAMERA
+    book getword camPendingCleanup $pageName state  -var CLEANUP_MODE
+    book getword camPendingCleanup $pageName cam_id -var CAM_ID
+    book getword camPendingCleanup $pageName dbname -var DBNAME
+
+    # specify choice of local or remote host based on camera and cam (class_id)
+    set.host.for.camera $CAMERA FPA
+
+    stdout $LOGDIR/camera.cleanup.log
+    stderr $LOGDIR/camera.cleanup.log
+
+    # XXX is everything listed here needed?
+    $run = ipp_cleanup.pl --stage camera --stage_id $CAM_ID --camera $CAMERA --mode $CLEANUP_MODE
+    add_standard_args run
+
+    # save the pageName for future reference below
+    options $pageName
+
+    # create the command line
+    if ($VERBOSE > 1)
+      echo command $run
+    end
+    command $run
+  end
+
+  # default exit status
+  task.exit    default
+    process_exit camPendingCleanup $options:0 $JOB_STATUS
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword camPendingCleanup $options:0 pantaskState CRASH
+  end
+
+  # operation timed out?
+  task.exit    timeout
+    showcommand timeout
+    book setword camPendingCleanup $options:0 pantaskState TIMEOUT
+  end
+end
+
+
+## fake.cleanup.pro
+
+book init fakePendingCleanup
+
+macro fake.cleanup.status
+  book listbook fakePendingCleanup
+end
+
+macro fake.cleanup.reset
+  book init fakePendingCleanup
+end
+
+macro fake.cleanup.on
+  task fake.cleanup.load
+    active true
+  end
+  task fake.cleanup.run
+    active true
+  end
+end
+
+macro fake.cleanup.off
+  task fake.cleanup.load
+    active false
+  end
+  task fake.cleanup.run
+    active false
+  end
+end
+
+# this variable will cycle through the known database names
+$fake_cleanup_DB = 0
+
+# select images ready for fake analysis
+# new entries are added to fakePendingImfile
+# skip already-present entries
+task	       fake.cleanup.load
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
+  periods      -timeout 30
+  npending     1
+  active       false
+
+  stdout NULL
+  stderr $LOGDIR/fake.cleanup.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = faketool -pendingcleanuprun
+    if ($DB:n == 0)
+      option DEFAULT
+      command 
+    else
+      # save the DB name for the exit tasks
+      option $DB:$fake_cleanup_DB
+      $run = $run -dbname $DB:$fake_cleanup_DB
+      $fake_cleanup_DB ++
+      if ($fake_cleanup_DB >= $DB:n) set fake_cleanup_DB = 0
+    end
+    add_poll_args run
+    add_poll_labels run
+    command $run
+  end
+
+  # success
+  task.exit    0
+    # convert 'stdout' to book format
+    ipptool2book stdout fakePendingCleanup -key fake_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    if ($VERBOSE > 2)
+      book listbook fakePendingCleanup
+    end
+
+    # delete existing entries in the appropriate pantaskStates
+    process_cleanup fakePendingCleanup
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+# run the ipp_cleanup.pl script on pending images
+task	       fake.cleanup.run
+  periods      -poll $RUNPOLL
+  periods      -exec $RUNEXEC
+  periods      -timeout 60
+  active       false
+
+  task.exec
+    book npages fakePendingCleanup -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new images in fakePendingCleanup (pantaskState == INIT)
+    book getpage fakePendingCleanup 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword fakePendingCleanup $pageName pantaskState RUN
+    book getword fakePendingCleanup $pageName camera -var CAMERA
+    book getword fakePendingCleanup $pageName state -var CLEANUP_MODE
+    book getword fakePendingCleanup $pageName fake_id -var FAKE_ID
+    book getword fakePendingCleanup $pageName dbname -var DBNAME
+
+    # specify choice of local or remote host based on camera and fake (class_id)
+    set.host.for.camera $CAMERA FPA
+
+    stdout $LOGDIR/fake.cleanup.log
+    stderr $LOGDIR/fake.cleanup.log
+
+    # XXX is everything listed here needed?
+    $run = ipp_cleanup.pl --stage fake --stage_id $FAKE_ID --camera $CAMERA --mode $CLEANUP_MODE
+    add_standard_args run
+
+    # save the pageName for future reference below
+    options $pageName
+
+    # create the command line
+    if ($VERBOSE > 1)
+      echo command $run
+    end
+    command $run
+  end
+
+  # default exit status
+  task.exit    default
+    process_exit fakePendingCleanup $options:0 $JOB_STATUS
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword fakePendingCleanup $options:0 pantaskState CRASH
+  end
+
+  # operation timed out?
+  task.exit    timeout
+    showcommand timeout
+    book setword fakePendingCleanup $options:0 pantaskState TIMEOUT
+  end
+end
+
+
+## warp.cleanup.pro
+
+
+book init warpPendingCleanup
+
+$warpCleanup_DB = 0
+
+macro warp.cleanup.status
+  book listbook warpPendingCleanup
+end
+
+macro warp.cleanup.reset
+  book init warpPendingCleanup
+end
+
+
+macro warp.cleanup.on
+  task warp.cleanup.load
+    active true
+  end
+  task warp.cleanup.run
+    active true
+  end
+end
+macro warp.cleanup.off
+  task warp.cleanup.load
+    active false
+  end
+  task warp.cleanup.run
+    active false
+  end
+end
+
+# select images ready for warp analysis
+# new entries are added to warpPendingImfile
+# skip already-present entries
+task	       warp.cleanup.load
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
+  periods      -timeout 30
+  npending     1
+  active       false
+
+  stdout NULL
+  stderr $LOGDIR/warp.cleanup.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = warptool -pendingcleanuprun
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$warpCleanup_DB
+      $run = $run -dbname $DB:$warpCleanup_DB
+      $warpCleanup_DB ++
+      if ($warpCleanup_DB >= $DB:n) set warpCleanup_DB = 0
+    end
+    add_poll_args run
+    add_poll_labels run
+    command $run
+  end
+
+  # success
+  task.exit    0
+    # convert 'stdout' to book format
+    ipptool2book stdout warpPendingCleanup -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    if ($VERBOSE > 2)
+      book listbook warpPendingCleanup
+    end
+
+    # delete existing entries in the appropriate pantaskStates
+    process_cleanup warpPendingCleanup
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+# run the ipp_cleanup.pl script on pending images
+task	       warp.cleanup.run
+  periods      -poll $RUNPOLL
+  periods      -exec $RUNEXEC
+  periods      -timeout 60
+  active       false
+
+  task.exec
+    book npages warpPendingCleanup -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new images in warpPendingCleanup (pantaskState == INIT)
+    book getpage warpPendingCleanup 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword warpPendingCleanup $pageName pantaskState RUN
+    book getword warpPendingCleanup $pageName camera -var CAMERA
+    book getword warpPendingCleanup $pageName state -var CLEANUP_MODE
+    book getword warpPendingCleanup $pageName warp_id -var WARP_ID
+    book getword warpPendingCleanup $pageName dbname -var DBNAME
+
+    # specify choice of local or remote host based on camera and warp (class_id)
+    set.host.for.camera $CAMERA FPA
+
+    stdout $LOGDIR/warp.cleanup.log
+    stderr $LOGDIR/warp.cleanup.log
+
+    # XXX is everything listed here needed?
+    $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE
+    add_standard_args run
+
+    # save the pageName for future reference below
+    options $pageName
+
+    # create the command line
+    if ($VERBOSE > 1)
+      echo command $run
+    end
+    command $run
+  end
+
+  # default exit status
+  task.exit    default
+    process_exit warpPendingCleanup $options:0 $JOB_STATUS
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword warpPendingCleanup $options:0 pantaskState CRASH
+  end
+
+  # operation timed out?
+  task.exit    timeout
+    showcommand timeout
+    book setword warpPendingCleanup $options:0 pantaskState TIMEOUT
+  end
+end
+
+
+
+## diff.cleanup.pro
+
+book init diffCleanup
+
+$diffCleanup_DB = 0
+
+macro diff.cleanup.status
+  book listbook diffCleanup
+end
+
+macro diff.cleanup.reset
+  book init diffCleanup
+end
+
+macro diff.cleanup.on
+  task diff.cleanup.load
+    active true
+  end
+  task diff.cleanup.run
+    active true
+  end
+end
+
+macro diff.cleanup.off
+  task diff.cleanup.load
+    active false
+  end
+  task diff.cleanup.run
+    active false
+  end
+end
+
+# select images ready for diff analysis
+# new entries are added to diffPendingImfile
+# skip already-present entries
+task	       diff.cleanup.load
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
+  periods      -timeout 30
+  npending     1
+  active       false
+
+  stdout NULL
+  stderr $LOGDIR/diff.cleanup.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = difftool -pendingcleanuprun
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$diffCleanup_DB
+      $run = $run -dbname $DB:$diffCleanup_DB
+      $diffCleanup_DB ++
+      if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0
+    end
+    add_poll_args run
+    add_poll_labels run
+    command $run
+  end
+
+  # success
+  task.exit    0
+    # convert 'stdout' to book format
+    ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    if ($VERBOSE > 2)
+      book listbook diffCleanup
+    end
+
+    # delete existing entries in the appropriate pantaskStates
+    process_cleanup diffCleanup
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+# run the ipp_cleanup.pl script on pending images
+task	       diff.cleanup.run
+  periods      -poll $RUNPOLL
+  periods      -exec $RUNEXEC
+  periods      -timeout 60
+  active       false
+
+  task.exec
+    book npages diffCleanup -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new images in diffCleanup (pantaskState == INIT)
+    book getpage diffCleanup 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword diffCleanup $pageName pantaskState RUN
+    book getword diffCleanup $pageName camera -var CAMERA
+    book getword diffCleanup $pageName state -var CLEANUP_MODE
+    book getword diffCleanup $pageName diff_id -var DIFF_ID
+    book getword diffCleanup $pageName dbname -var DBNAME
+
+    # specify choice of local or remote host based on camera and diff (class_id)
+    set.host.for.camera $CAMERA FPA
+
+    stdout $LOGDIR/diff.cleanup.log
+    stderr $LOGDIR/diff.cleanup.log
+
+    # XXX is everything listed here needed?
+    $run = ipp_cleanup.pl --stage diff --stage_id $DIFF_ID --camera $CAMERA --mode $CLEANUP_MODE
+    add_standard_args run
+
+    # save the pageName for future reference below
+    options $pageName
+
+    # create the command line
+    if ($VERBOSE > 1)
+      echo command $run
+    end
+    command $run
+  end
+
+  # default exit status
+  task.exit    default
+    process_exit diffCleanup $options:0 $JOB_STATUS
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword diffCleanup $options:0 pantaskState CRASH
+  end
+
+  # operation timed out?
+  task.exit    timeout
+    showcommand timeout
+    book setword diffCleanup $options:0 pantaskState TIMEOUT
+  end
+end
+
+## stack.cleanup.pro
+
+book init stackCleanup
+
+$stackCleanup_DB = 0
+
+macro stack.cleanup.status
+  book listbook stackCleanup
+end
+
+macro stack.cleanup.reset
+  book init stackCleanup
+end
+
+macro stack.cleanup.on
+  task stack.cleanup.load
+    active true
+  end
+  task stack.cleanup.run
+    active true
+  end
+end
+
+macro stack.cleanup.off
+  task stack.cleanup.load
+    active false
+  end
+  task stack.cleanup.run
+    active false
+  end
+end
+
+# select images ready for stack analysis
+# new entries are added to stackCleanup
+# skip already-present entries
+task	       stack.cleanup.load
+  host         local
+
+  periods      -poll $LOADPOLL
+  periods      -exec $LOADEXEC
+  periods      -timeout 30
+  npending     1
+  active       false
+
+  stdout NULL
+  stderr $LOGDIR/stack.cleanup.log
+
+  task.exec
+    if ($LABEL:n == 0) break
+    $run = stacktool -pendingcleanuprun
+    if ($DB:n == 0)
+      option DEFAULT
+    else
+      # save the DB name for the exit tasks
+      option $DB:$stackCleanup_DB
+      $run = $run -dbname $DB:$stackCleanup_DB
+      $stackCleanup_DB ++
+      if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0
+    end
+    add_poll_args run
+    add_poll_labels run
+    command $run
+  end
+
+  # success
+  task.exit    0
+    # convert 'stdout' to book format
+    ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    if ($VERBOSE > 2)
+      book listbook stackCleanup
+    end
+
+    # delete existing entries in the appropriate pantaskStates
+    process_cleanup stackCleanup
+  end
+
+  # locked list
+  task.exit    default
+    showcommand failure
+  end
+
+  task.exit    crash
+    showcommand crash
+  end
+
+  # operation times out?
+  task.exit    timeout
+    showcommand timeout
+  end
+end
+
+# run the ipp_cleanup.pl script on pending images
+task	       stack.cleanup.run
+  periods      -poll $RUNPOLL
+  periods      -exec $RUNEXEC
+  periods      -timeout 60
+  active       false
+
+  task.exec
+    book npages stackCleanup -var N
+    if ($N == 0) break
+    if ($NETWORK == 0) break
+    
+    # look for new images in stackCleanup (pantaskState == INIT)
+    book getpage stackCleanup 0 -var pageName -key pantaskState INIT
+    if ("$pageName" == "NULL") break
+
+    book setword stackCleanup $pageName pantaskState RUN
+    book getword stackCleanup $pageName camera -var CAMERA
+    book getword stackCleanup $pageName state -var CLEANUP_MODE
+    book getword stackCleanup $pageName stack_id -var STACK_ID
+    book getword stackCleanup $pageName dbname -var DBNAME
+
+    # specify choice of local or remote host based on camera and stack (class_id)
+    set.host.for.camera $CAMERA FPA
+
+    stdout $LOGDIR/stack.cleanup.log
+    stderr $LOGDIR/stack.cleanup.log
+
+    # XXX is everything listed here needed?
+    $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
+    add_standard_args run
+
+    # save the pageName for future reference below
+    options $pageName
+
+    # create the command line
+    if ($VERBOSE > 1)
+      echo command $run
+    end
+    command $run
+  end
+
+  # default exit status
+  task.exit    default
+    process_exit stackCleanup $options:0 $JOB_STATUS
+  end
+
+  task.exit    crash
+    showcommand crash
+    book setword stackCleanup $options:0 pantaskState CRASH
+  end
+
+  # operation timed out?
+  task.exit    timeout
+    showcommand timeout
+    book setword stackCleanup $options:0 pantaskState TIMEOUT
+  end
+end
+
+
Index: trunk/ippTasks/stack.pro
===================================================================
--- trunk/ippTasks/stack.pro	(revision 24554)
+++ trunk/ippTasks/stack.pro	(revision 24595)
@@ -10,14 +10,14 @@
 ### Initialise the books containing the tasks to do
 book init stackSumSkyfile
-book init stackCleanup
+#book init stackCleanup
 
 ### Database lists
 $stackSkycell_DB = 0
-$stackCleanup_DB = 0
+#$stackCleanup_DB = 0
 
 ### Check status of stacking tasks
 macro stack.status
   book listbook stackSumSkyfile
-  book listbook stackCleanup
+#  book listbook stackCleanup
 end
 
@@ -25,5 +25,5 @@
 macro stack.reset
   book init stackSumSkyfile
-  book init stackCleanup
+#  book init stackCleanup
 end
 
@@ -48,21 +48,21 @@
 end
 
-macro stack.cleanup.on
-  task stack.cleanup.load
-    active true
-  end
-  task stack.cleanup.run
-    active true
-  end
-end
-
-macro stack.cleanup.off
-  task stack.cleanup.load
-    active false
-  end
-  task stack.cleanup.run
-    active false
-  end
-end
+# macro stack.cleanup.on
+#   task stack.cleanup.load
+#     active true
+#   end
+#   task stack.cleanup.run
+#     active true
+#   end
+# end
+
+# macro stack.cleanup.off
+#   task stack.cleanup.load
+#     active false
+#   end
+#   task stack.cleanup.run
+#     active false
+#   end
+# end
 
 
@@ -195,119 +195,119 @@
 
 
-# select images ready for stack analysis
-# new entries are added to stackCleanup
-# skip already-present entries
-task	       stack.cleanup.load
-  host         local
-
-  periods      -poll $LOADPOLL
-  periods      -exec $LOADEXEC
-  periods      -timeout 30
-  npending     1
-  active       false
-
-  stdout NULL
-  stderr $LOGDIR/stack.cleanup.log
-
-  task.exec
-    if ($LABEL:n == 0) break
-    $run = stacktool -pendingcleanuprun
-    if ($DB:n == 0)
-      option DEFAULT
-    else
-      # save the DB name for the exit tasks
-      option $DB:$stackCleanup_DB
-      $run = $run -dbname $DB:$stackCleanup_DB
-      $stackCleanup_DB ++
-      if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0
-    end
-    add_poll_args run
-    add_poll_labels run
-    command $run
-  end
-
-  # success
-  task.exit    0
-    # convert 'stdout' to book format
-    ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-    if ($VERBOSE > 2)
-      book listbook stackCleanup
-    end
-
-    # delete existing entries in the appropriate pantaskStates
-    process_cleanup stackCleanup
-  end
-
-  # locked list
-  task.exit    default
-    showcommand failure
-  end
-
-  task.exit    crash
-    showcommand crash
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand timeout
-  end
-end
-
-# run the ipp_cleanup.pl script on pending images
-task	       stack.cleanup.run
-  periods      -poll $RUNPOLL
-  periods      -exec $RUNEXEC
-  periods      -timeout 60
-  active       false
-
-  task.exec
-    book npages stackCleanup -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+# # select images ready for stack analysis
+# # new entries are added to stackCleanup
+# # skip already-present entries
+# task	       stack.cleanup.load
+#   host         local
+
+#   periods      -poll $LOADPOLL
+#   periods      -exec $LOADEXEC
+#   periods      -timeout 30
+#   npending     1
+#   active       false
+
+#   stdout NULL
+#   stderr $LOGDIR/stack.cleanup.log
+
+#   task.exec
+#     if ($LABEL:n == 0) break
+#     $run = stacktool -pendingcleanuprun
+#     if ($DB:n == 0)
+#       option DEFAULT
+#     else
+#       # save the DB name for the exit tasks
+#       option $DB:$stackCleanup_DB
+#       $run = $run -dbname $DB:$stackCleanup_DB
+#       $stackCleanup_DB ++
+#       if ($stackCleanup_DB >= $DB:n) set stackCleanup_DB = 0
+#     end
+#     add_poll_args run
+#     add_poll_labels run
+#     command $run
+#   end
+
+#   # success
+#   task.exit    0
+#     # convert 'stdout' to book format
+#     ipptool2book stdout stackCleanup -key stack_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+#     if ($VERBOSE > 2)
+#       book listbook stackCleanup
+#     end
+
+#     # delete existing entries in the appropriate pantaskStates
+#     process_cleanup stackCleanup
+#   end
+
+#   # locked list
+#   task.exit    default
+#     showcommand failure
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#   end
+
+#   # operation times out?
+#   task.exit    timeout
+#     showcommand timeout
+#   end
+# end
+
+# # run the ipp_cleanup.pl script on pending images
+# task	       stack.cleanup.run
+#   periods      -poll $RUNPOLL
+#   periods      -exec $RUNEXEC
+#   periods      -timeout 60
+#   active       false
+
+#   task.exec
+#     book npages stackCleanup -var N
+#     if ($N == 0) break
+#     if ($NETWORK == 0) break
     
-    # look for new images in stackCleanup (pantaskState == INIT)
-    book getpage stackCleanup 0 -var pageName -key pantaskState INIT
-    if ("$pageName" == "NULL") break
-
-    book setword stackCleanup $pageName pantaskState RUN
-    book getword stackCleanup $pageName camera -var CAMERA
-    book getword stackCleanup $pageName state -var CLEANUP_MODE
-    book getword stackCleanup $pageName stack_id -var STACK_ID
-    book getword stackCleanup $pageName dbname -var DBNAME
-
-    # specify choice of local or remote host based on camera and stack (class_id)
-    set.host.for.camera $CAMERA FPA
-
-    stdout $LOGDIR/stack.cleanup.log
-    stderr $LOGDIR/stack.cleanup.log
-
-    # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
-    add_standard_args run
-
-    # save the pageName for future reference below
-    options $pageName
-
-    # create the command line
-    if ($VERBOSE > 1)
-      echo command $run
-    end
-    command $run
-  end
-
-  # default exit status
-  task.exit    default
-    process_exit stackCleanup $options:0 $JOB_STATUS
-  end
-
-  task.exit    crash
-    showcommand crash
-    book setword stackCleanup $options:0 pantaskState CRASH
-  end
-
-  # operation timed out?
-  task.exit    timeout
-    showcommand timeout
-    book setword stackCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+#     # look for new images in stackCleanup (pantaskState == INIT)
+#     book getpage stackCleanup 0 -var pageName -key pantaskState INIT
+#     if ("$pageName" == "NULL") break
+
+#     book setword stackCleanup $pageName pantaskState RUN
+#     book getword stackCleanup $pageName camera -var CAMERA
+#     book getword stackCleanup $pageName state -var CLEANUP_MODE
+#     book getword stackCleanup $pageName stack_id -var STACK_ID
+#     book getword stackCleanup $pageName dbname -var DBNAME
+
+#     # specify choice of local or remote host based on camera and stack (class_id)
+#     set.host.for.camera $CAMERA FPA
+
+#     stdout $LOGDIR/stack.cleanup.log
+#     stderr $LOGDIR/stack.cleanup.log
+
+#     # XXX is everything listed here needed?
+#     $run = ipp_cleanup.pl --stage stack --stage_id $STACK_ID --camera $CAMERA --mode $CLEANUP_MODE
+#     add_standard_args run
+
+#     # save the pageName for future reference below
+#     options $pageName
+
+#     # create the command line
+#     if ($VERBOSE > 1)
+#       echo command $run
+#     end
+#     command $run
+#   end
+
+#   # default exit status
+#   task.exit    default
+#     process_exit stackCleanup $options:0 $JOB_STATUS
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#     book setword stackCleanup $options:0 pantaskState CRASH
+#   end
+
+#   # operation timed out?
+#   task.exit    timeout
+#     showcommand timeout
+#     book setword stackCleanup $options:0 pantaskState TIMEOUT
+#   end
+# end
Index: trunk/ippTasks/warp.pro
===================================================================
--- trunk/ippTasks/warp.pro	(revision 24554)
+++ trunk/ippTasks/warp.pro	(revision 24595)
@@ -17,5 +17,5 @@
 $warpExp_DB = 0
 $warpSkycell_DB = 0
-$warpCleanup_DB = 0
+#$warpCleanup_DB = 0
 
 ### Check status of warping tasks
@@ -23,5 +23,5 @@
   book listbook warpInputExp
   book listbook warpPendingSkyCell
-  book listbook warpPendingCleanup
+#  book listbook warpPendingCleanup
 end
 
@@ -30,5 +30,5 @@
   book init warpInputExp
   book init warpPendingSkyCell
-  book init warpPendingCleanup
+#  book init warpPendingCleanup
 end
 
@@ -71,20 +71,20 @@
 end
 
-macro warp.cleanup.on
-  task warp.cleanup.load
-    active true
-  end
-  task warp.cleanup.run
-    active true
-  end
-end
-macro warp.cleanup.off
-  task warp.cleanup.load
-    active false
-  end
-  task warp.cleanup.run
-    active false
-  end
-end
+# macro warp.cleanup.on
+#   task warp.cleanup.load
+#     active true
+#   end
+#   task warp.cleanup.run
+#     active true
+#   end
+# end
+# macro warp.cleanup.off
+#   task warp.cleanup.load
+#     active false
+#   end
+#   task warp.cleanup.run
+#     active false
+#   end
+# end
 
 ### Load tasks for calculating the warp overlaps
@@ -404,119 +404,119 @@
 end
 
-# select images ready for warp analysis
-# new entries are added to warpPendingImfile
-# skip already-present entries
-task	       warp.cleanup.load
-  host         local
-
-  periods      -poll $LOADPOLL
-  periods      -exec $LOADEXEC
-  periods      -timeout 30
-  npending     1
-  active       false
-
-  stdout NULL
-  stderr $LOGDIR/warp.cleanup.log
-
-  task.exec
-    if ($LABEL:n == 0) break
-    $run = warptool -pendingcleanuprun
-    if ($DB:n == 0)
-      option DEFAULT
-    else
-      # save the DB name for the exit tasks
-      option $DB:$warpCleanup_DB
-      $run = $run -dbname $DB:$warpCleanup_DB
-      $warpCleanup_DB ++
-      if ($warpCleanup_DB >= $DB:n) set warpCleanup_DB = 0
-    end
-    add_poll_args run
-    add_poll_labels run
-    command $run
-  end
-
-  # success
-  task.exit    0
-    # convert 'stdout' to book format
-    ipptool2book stdout warpPendingCleanup -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
-    if ($VERBOSE > 2)
-      book listbook warpPendingCleanup
-    end
-
-    # delete existing entries in the appropriate pantaskStates
-    process_cleanup warpPendingCleanup
-  end
-
-  # locked list
-  task.exit    default
-    showcommand failure
-  end
-
-  task.exit    crash
-    showcommand crash
-  end
-
-  # operation times out?
-  task.exit    timeout
-    showcommand timeout
-  end
-end
-
-# run the ipp_cleanup.pl script on pending images
-task	       warp.cleanup.run
-  periods      -poll $RUNPOLL
-  periods      -exec $RUNEXEC
-  periods      -timeout 60
-  active       false
-
-  task.exec
-    book npages warpPendingCleanup -var N
-    if ($N == 0) break
-    if ($NETWORK == 0) break
+# # select images ready for warp analysis
+# # new entries are added to warpPendingImfile
+# # skip already-present entries
+# task	       warp.cleanup.load
+#   host         local
+
+#   periods      -poll $LOADPOLL
+#   periods      -exec $LOADEXEC
+#   periods      -timeout 30
+#   npending     1
+#   active       false
+
+#   stdout NULL
+#   stderr $LOGDIR/warp.cleanup.log
+
+#   task.exec
+#     if ($LABEL:n == 0) break
+#     $run = warptool -pendingcleanuprun
+#     if ($DB:n == 0)
+#       option DEFAULT
+#     else
+#       # save the DB name for the exit tasks
+#       option $DB:$warpCleanup_DB
+#       $run = $run -dbname $DB:$warpCleanup_DB
+#       $warpCleanup_DB ++
+#       if ($warpCleanup_DB >= $DB:n) set warpCleanup_DB = 0
+#     end
+#     add_poll_args run
+#     add_poll_labels run
+#     command $run
+#   end
+
+#   # success
+#   task.exit    0
+#     # convert 'stdout' to book format
+#     ipptool2book stdout warpPendingCleanup -key warp_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+#     if ($VERBOSE > 2)
+#       book listbook warpPendingCleanup
+#     end
+
+#     # delete existing entries in the appropriate pantaskStates
+#     process_cleanup warpPendingCleanup
+#   end
+
+#   # locked list
+#   task.exit    default
+#     showcommand failure
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#   end
+
+#   # operation times out?
+#   task.exit    timeout
+#     showcommand timeout
+#   end
+# end
+
+# # run the ipp_cleanup.pl script on pending images
+# task	       warp.cleanup.run
+#   periods      -poll $RUNPOLL
+#   periods      -exec $RUNEXEC
+#   periods      -timeout 60
+#   active       false
+
+#   task.exec
+#     book npages warpPendingCleanup -var N
+#     if ($N == 0) break
+#     if ($NETWORK == 0) break
     
-    # look for new images in warpPendingCleanup (pantaskState == INIT)
-    book getpage warpPendingCleanup 0 -var pageName -key pantaskState INIT
-    if ("$pageName" == "NULL") break
-
-    book setword warpPendingCleanup $pageName pantaskState RUN
-    book getword warpPendingCleanup $pageName camera -var CAMERA
-    book getword warpPendingCleanup $pageName state -var CLEANUP_MODE
-    book getword warpPendingCleanup $pageName warp_id -var WARP_ID
-    book getword warpPendingCleanup $pageName dbname -var DBNAME
-
-    # specify choice of local or remote host based on camera and warp (class_id)
-    set.host.for.camera $CAMERA FPA
-
-    stdout $LOGDIR/warp.cleanup.log
-    stderr $LOGDIR/warp.cleanup.log
-
-    # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE
-    add_standard_args run
-
-    # save the pageName for future reference below
-    options $pageName
-
-    # create the command line
-    if ($VERBOSE > 1)
-      echo command $run
-    end
-    command $run
-  end
-
-  # default exit status
-  task.exit    default
-    process_exit warpPendingCleanup $options:0 $JOB_STATUS
-  end
-
-  task.exit    crash
-    showcommand crash
-    book setword warpPendingCleanup $options:0 pantaskState CRASH
-  end
-
-  # operation timed out?
-  task.exit    timeout
-    showcommand timeout
-    book setword warpPendingCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+#     # look for new images in warpPendingCleanup (pantaskState == INIT)
+#     book getpage warpPendingCleanup 0 -var pageName -key pantaskState INIT
+#     if ("$pageName" == "NULL") break
+
+#     book setword warpPendingCleanup $pageName pantaskState RUN
+#     book getword warpPendingCleanup $pageName camera -var CAMERA
+#     book getword warpPendingCleanup $pageName state -var CLEANUP_MODE
+#     book getword warpPendingCleanup $pageName warp_id -var WARP_ID
+#     book getword warpPendingCleanup $pageName dbname -var DBNAME
+
+#     # specify choice of local or remote host based on camera and warp (class_id)
+#     set.host.for.camera $CAMERA FPA
+
+#     stdout $LOGDIR/warp.cleanup.log
+#     stderr $LOGDIR/warp.cleanup.log
+
+#     # XXX is everything listed here needed?
+#     $run = ipp_cleanup.pl --stage warp --stage_id $WARP_ID --camera $CAMERA --mode $CLEANUP_MODE
+#     add_standard_args run
+
+#     # save the pageName for future reference below
+#     options $pageName
+
+#     # create the command line
+#     if ($VERBOSE > 1)
+#       echo command $run
+#     end
+#     command $run
+#   end
+
+#   # default exit status
+#   task.exit    default
+#     process_exit warpPendingCleanup $options:0 $JOB_STATUS
+#   end
+
+#   task.exit    crash
+#     showcommand crash
+#     book setword warpPendingCleanup $options:0 pantaskState CRASH
+#   end
+
+#   # operation timed out?
+#   task.exit    timeout
+#     showcommand timeout
+#     book setword warpPendingCleanup $options:0 pantaskState TIMEOUT
+#   end
+# end
