Index: trunk/ippTasks/chip.pro
===================================================================
--- trunk/ippTasks/chip.pro	(revision 18142)
+++ trunk/ippTasks/chip.pro	(revision 18273)
@@ -8,7 +8,4 @@
 # test for required global variables
 check.globals
-
-$LOGSUBDIR = $LOGDIR/chip
-exec mkdir -p $LOGSUBDIR
 
 book init chipPendingImfile
@@ -70,5 +67,5 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/chip.imfile.log
+  stderr $LOGDIR/chip.imfile.log
 
   task.exec
@@ -151,15 +148,6 @@
     sprintf outroot "%s/%s/%s.ch.%s" $WORKDIR $EXP_TAG $EXP_TAG $CHIP_ID
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $outroot`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in chip.pro:152"
-      break
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
+    stdout $logdir/chip.imfile.log
+    stderr $logdir/chip.imfile.log
 
     $run = chip_imfile.pl --exp_id $EXP_ID --chip_id $CHIP_ID --class_id $CLASS_ID --uri $URI --camera $CAMERA --outroot $outroot
@@ -207,14 +195,14 @@
 
   stdout NULL
-  stderr $LOGSUBDIR/chip.cleanup.log
+  stderr $LOGDIR/chip.cleanup.log
 
   task.exec
     if ($DB:n == 0)
       option DEFAULT
-      command chiptool -pendingcleanup -limit 20
+      command chiptool -pendingcleanuprun -limit 20
     else
       # save the DB name for the exit tasks
       option $DB:$chip_cleanup_DB
-      command chiptool -pendingcleanup -limit 20 -dbname $DB:$chip_cleanup_DB
+      command chiptool -pendingcleanuprun -limit 20 -dbname $DB:$chip_cleanup_DB
       $chip_cleanup_DB ++
       if ($chip_cleanup_DB >= $DB:n) set chip_cleanup_DB = 0
@@ -263,7 +251,6 @@
     book setword chipPendingCleanup $pageName pantaskState RUN
     book getword chipPendingCleanup $pageName camera -var CAMERA
-    book getword chipPendingCleanup $pageName class_id -var CLASS_ID
     book getword chipPendingCleanup $pageName cleanup_mode -var CLEANUP_MODE
-    book getword chipPendingCleanup $pageName path_base -var PATH_BASE
+    book getword chipPendingCleanup $pageName chip_id -var CHIP_ID
     book getword chipPendingCleanup $pageName dbname -var DBNAME
 
@@ -271,18 +258,9 @@
     set.host.for.camera $CAMERA $CLASS_ID
 
-    ## generate output log based on filerule (convert the URI to a PATH)
-    $logfile = `ipp_filename.pl --filerule LOG.IMFILE --camera $CAMERA --class_id $CLASS_ID --basename $PATH_BASE`
-    if ("$logfile" == "") 
-      echo "WARNING: logfile not defined in chip.pro:152"
-      break
-    end
-
-    stdout $logfile
-    stderr $logfile
-    dirname $logfile -var outpath
-    mkdir $outpath
+    stdout $LOGDIR/chip.cleanup.log
+    stderr $LOGDIR/chip.cleanup.log
 
     # XXX is everything listed here needed?
-    $run = ipp_cleanup.pl --stage chip --camera $CAMERA --class_id $CLASS_ID --mode $CLEANUP_MODE --path_base $PATH_BASE
+    $run = ipp_cleanup.pl --stage chip --stage_id $CHIP_ID --camera $CAMERA --mode $CLEANUP_MODE
     add_standard_args run
 
