Index: /branches/eam_branch_20080806/ippTasks/diff.pro
===================================================================
--- /branches/eam_branch_20080806/ippTasks/diff.pro	(revision 19073)
+++ /branches/eam_branch_20080806/ippTasks/diff.pro	(revision 19074)
@@ -8,9 +8,7 @@
 check.globals
 
-$LOGSUBDIR = $LOGDIR/diff
-exec mkdir -p $LOGSUBDIR
-
 ### Initialise the books containing the tasks to do
 book init diffSkyfile
+book init diffCleanup
 
 ### Database lists
@@ -74,5 +72,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/diff.skycell.log
+  stderr $LOGDIR/diff.skycell.log
 
   task.exec
@@ -137,4 +135,5 @@
 
     ### XXX Instead of setting these by camera, need to set by skycell_id
+    ### XXX change these to use the --redirect scheme
 #    set.host.for.camera $CAMERA $DIFF_ID
 #    set.workdir.by.camera $CAMERA $DIFF_ID $WORKDIR_TEMPLATE $default_host WORKDIR
@@ -203,8 +202,8 @@
     else
       # save the DB name for the exit tasks
-      option $DB:$diff_cleanup_DB
-      command difftool -pendingcleanuprun -limit 20 -dbname $DB:$diff_cleanup_DB
-      $diff_cleanup_DB ++
-      if ($diff_cleanup_DB >= $DB:n) set diff_cleanup_DB = 0
+      option $DB:$diffCleanup_DB
+      command difftool -pendingcleanuprun -limit 20 -dbname $DB:$diffCleanup_DB
+      $diffCleanup_DB ++
+      if ($diffCleanup_DB >= $DB:n) set diffCleanup_DB = 0
     end
   end
@@ -213,11 +212,11 @@
   task.exit    0
     # convert 'stdout' to book format
-    ipptool2book stdout diffPendingCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
+    ipptool2book stdout diffCleanup -key diff_id -uniq -setword dbname $options:0 -setword pantaskState INIT
     if ($VERBOSE > 2)
-      book listbook diffPendingCleanup
+      book listbook diffCleanup
     end
 
     # delete existing entries in the appropriate pantaskStates
-    process_cleanup diffPendingCleanup
+    process_cleanup diffCleanup
   end
 
@@ -241,17 +240,17 @@
 
   task.exec
-    book npages diffPendingCleanup -var N
+    book npages diffCleanup -var N
     if ($N == 0) break
     if ($NETWORK == 0) break
     
-    # look for new images in diffPendingCleanup (pantaskState == INIT)
-    book getpage diffPendingCleanup 0 -var pageName -key pantaskState INIT
+    # look for new images in diffCleanup (pantaskState == INIT)
+    book getpage diffCleanup 0 -var pageName -key pantaskState INIT
     if ("$pageName" == "NULL") break
 
-    book setword diffPendingCleanup $pageName pantaskState RUN
-    book getword diffPendingCleanup $pageName camera -var CAMERA
-    book getword diffPendingCleanup $pageName state -var CLEANUP_MODE
-    book getword diffPendingCleanup $pageName diff_id -var DIFF_ID
-    book getword diffPendingCleanup $pageName dbname -var DBNAME
+    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)
@@ -277,5 +276,5 @@
   # default exit status
   task.exit    default
-    process_exit diffPendingCleanup $options:0 $JOB_STATUS
+    process_exit diffCleanup $options:0 $JOB_STATUS
   end
 
@@ -283,5 +282,5 @@
   task.exit    timeout
     showcommand timeout
-    book setword diffPendingCleanup $options:0 pantaskState TIMEOUT
-  end
-end
+    book setword diffCleanup $options:0 pantaskState TIMEOUT
+  end
+end
