Index: trunk/ippTasks/summit.copy.pro
===================================================================
--- trunk/ippTasks/summit.copy.pro	(revision 14693)
+++ trunk/ippTasks/summit.copy.pro	(revision 15063)
@@ -2,8 +2,14 @@
 
 #$uri        = http://otis/ds/skyprobe/
-$uri        = http://otis4.ifa.hawaii.edu/ds/allskycam/
-$camera     = allskycam
-$telescope  = zl
-$workdir    = /home/moanui/jhoblitt/workdir
+#$uri        = http://otis4.ifa.hawaii.edu/ds/allskycam/
+#$camera     = allskycam
+#$telescope  = zl
+#$workdir    = /data/ipp004.0/allskycam
+$uri        = http://conductor/ds/gpc1/index.txt
+$camera     = gpc1
+$telescope  = ps1
+$workdir    = /data/ipp006.0/gpc1
+
+$VERBOSE = 1
 
 if ($?network == 0)
@@ -25,7 +31,7 @@
 
   # timeout shorter than exec so jobs do not build up
-  periods      -exec     30
-  periods      -poll     10
-  periods      -timeout  30
+  periods      -exec     15
+  periods      -poll     1
+  periods      -timeout  15
 
   task.exit     0
@@ -42,11 +48,11 @@
 # build a book of exps/filesetids that need to be queried
 task pztool.pendingexp
-    command      pztool -pendingexp
+    command      pztool -pendingexp -limit 25
     host         local
 
     # timeout shorter than exec so jobs do not build up
-    periods      -exec     30
-    periods      -poll     10
-    periods      -timeout  30
+    periods      -exec     15
+    periods      -poll     1
+    periods      -timeout  15
 
     # success
@@ -73,6 +79,8 @@
 task pzgetimfile 
     periods      -exec     1
-    periods      -poll     5
+    periods      -poll     1
     periods      -timeout  15
+    host 	local
+    npending 	5
 
     task.exec
@@ -105,5 +113,6 @@
         options $pageName
 
-        $run = pzgetimfiles -uri $URI -filesetid $EXP_NAME -inst $CAMERA -telescope $TELESCOPE
+        $batman = $EXP_NAME
+        $run = pzgetimfiles -uri $URI -filesetid $batman -inst $CAMERA -telescope $TELESCOPE
 
         # create the command line
@@ -121,5 +130,5 @@
     task.exit default
         showcommand failure
-        book setword pzPendingExp $options:0 pantaskState $JOB_STATUS
+        process_exit pzPendingExp $options:0 $JOB_STATUS
     end
 
@@ -133,17 +142,24 @@
 # build a book of imfiles/files that need to be downloaded
 task pztool.pendingimfile
-    command      pztool -pendingimfile
+    command      pztool -pendingimfile -limit 25
     host         local
 
     # timeout shorter than exec so jobs do not build up
-    periods      -exec     30
-    periods      -poll     10
-    periods      -timeout  30
+    periods      -exec     5
+    periods      -poll     1
+    periods      -timeout  15
 
     # success
     task.exit    0
         # convert 'stdout' to book format
-#       ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT
-        ipptool2book stdout pzPendingImfile -key exp_name:camera:telescope -uniq -setword pantaskState INIT
+#       ipptool2book stdout pzPendingImfile -key exp_name:class_id:camera:telescope -uniq -setword dbname $options:0 -setword pantaskState INIT
+
+#        echo "pendingimfile "
+#        queuesize stdout
+
+        ipptool2book stdout pzPendingImfile -key exp_name:class_id:camera:telescope -uniq -setword pantaskState INIT
+
+#        echo "pzPendingImfile N "
+#        book npages pzPendingImfile
 
         # delete existing entries in the appropriate pantaskStates
@@ -163,6 +179,7 @@
 task dsget
     periods      -exec     5
-    periods      -poll     5
+    periods      -poll     1
     periods      -timeout  30
+    host        anyhost
 
     task.exec
@@ -189,9 +206,19 @@
         book getword pzPendingImfile $pageName bytes -var BYTES
         book getword pzPendingImfile $pageName md5sum -var MD5SUM
+        book getword pzPendingImfile $pageName dateobs -var DATEOBS
+
+        # figure out filename
+        $FILENAME = $workdir/$EXP_NAME.$CLASS_ID.fits
+
+        book setword pzPendingImfile $pageName filename FILENAME
 
         # store the pageName with this job
         options $pageName
 
-        $run = dsget --uri $URI --filename $workdir/$EXP_NAME.$CLASS_ID.fits --bytes $BYTES --md5 $MD5SUM
+        if ($MD5SUM == 0) 
+            $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES 
+        else
+            $run = dsget --uri $URI --filename $FILENAME --bytes $BYTES --md5 $MD5SUM
+        end
 
         # create the command line
@@ -205,12 +232,13 @@
     task.exit 0
         # get related info from the associated page
-        book getword pzPendingImfile $options:0 uri -var URI
         book getword pzPendingImfile $options:0 exp_name -var EXP_NAME
+        book getword pzPendingImfile $options:0 class -var CLASS
+        book getword pzPendingImfile $options:0 camera -var CAMERA
+        book getword pzPendingImfile $options:0 telescope -var TELESCOPE
         book getword pzPendingImfile $options:0 class_id -var CLASS_ID
-        book getword pzPendingImfile $options:0 bytes -var BYTES
-        book getword pzPendingImfile $options:0 md5sum -var MD5SUM
+        book getword pzPendingImfile $options:0 filename -var FILENAME
 
 	# update the database with the success
-        $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri  $workdir/$EXP_NAME.$CLASS_ID.fits
+        $run = pztool -copydone -exp_name $EXP_NAME -inst $CAMERA -telescope $TELESCOPE -class $CLASS -class_id $CLASS_ID -uri $FILENAME
 
         # create the command line
@@ -221,10 +249,10 @@
 
 	# update the pantasks process tables
-        process_exit pzPendingExp $options:0 $JOB_STATUS
+        process_exit pzPendingImfile $options:0 $JOB_STATUS
     end
 
     task.exit default
         showcommand failure
-        book setword pzPendingImfile $options:0 pantaskState $JOB_STATUS
+        process_exit pzPendingImfile $options:0 $JOB_STATUS
     end
 
