Index: branches/tap_branches/ippTasks/summit.copy.pro
===================================================================
--- branches/tap_branches/ippTasks/summit.copy.pro	(revision 25900)
+++ branches/tap_branches/ippTasks/summit.copy.pro	(revision 27838)
@@ -111,4 +111,5 @@
 
     task.exec
+#      echo "DB_DEBUG: PRE" $pztoolDatastore_DB $DB:$pztoolDatastore_DB
       if ($DB:n == 0)
         option DEFAULT
@@ -121,4 +122,7 @@
         if ($pztoolDatastore_DB >= $DB:n) set pztoolDatastore_DB = 0
       end
+
+      # More debug
+#      echo "DB_DEBUG: POST" $pztoolDatastore_DB $DB:$pztoolDatastore_DB
       periods -exec 120
     end
@@ -127,5 +131,5 @@
     task.exit 0
         # flush pzDataStore book
-        book init pzDataStore
+#        book init pzDataStore
         # convert 'stdout' to book format
         ipptool2book stdout pzDataStore -key camera:telescope -uniq -setword dbname $options:0
@@ -147,5 +151,5 @@
 # run pzgetexp periodically to populate pzPendingExp in the database (no I/O)
 # this task is querying the data store for a list of exposures ("filesets")
-# and inserting these into a db table on the local cluster (pzPendingExp)
+# and inserting these into a db table on the local cluster (pzDownloadExp)
 task pzgetexp
   periods      -exec     30
@@ -379,5 +383,5 @@
     periods      -exec     5
     periods      -poll     0.05
-    periods      -timeout  650
+    periods      -timeout  1150
     trange        -reset
     # only active in the night (18:00 to 06:00 HST, times are UT):
@@ -446,14 +450,25 @@
 	stderr $LOGDIR/summit.copy.log
 
-        $run = summit_copy.pl --uri $URI --filename $FILENAME --exp_name $EXP_NAME --inst $CAMERA --telescope $TELESCOPE --class $CLASS --class_id $CLASS_ID --bytes $BYTES --md5 $MD5SUM --dbname $DBNAME --timeout 120 --verbose --copies 2
-	if ($COMPRESS) 
+	book getpage pzDataStore 0 -var PZDSPAGE -key dbname $DBNAME 
+	book getword pzDataStore $PZDSPAGE use_compress  -var USECOMPRESS
+
+	# Debug line
+#	echo "DEBUG: " $DBNAME $EXP_NAME $CAMERA $PZDSPAGE $USECOMPRESS
+
+        # unconditionally turn on requesting compression until we figuure
+        # out why the above doesn't work
+	if ($USECOMPRESS == "NULL") 
+#	if ("$CAMERA" == "gpc1") 
+	    $USECOMPRESS = 1
+	end
+
+        $run = summit_copy.pl --uri $URI --filename $FILENAME --exp_name $EXP_NAME --inst $CAMERA --telescope $TELESCOPE --class $CLASS --class_id $CLASS_ID --bytes $BYTES --md5 $MD5SUM --dbname $DBNAME --timeout 600 --verbose --copies 2
+	if ($USECOMPRESS == 1) 
             $run = $run --compress
-        else
-            $run = $run --bytes $BYTES 
-        end
-        if (("$MD5SUM" != "NULL") && ("$MD5SUM" != "0") && (not($COMPRESS)))
+        end
+#        if (("$MD5SUM" != "NULL") && ("$MD5SUM" != "0") && (not($COMPRESS)))
 # && (($YEAR > 2008) || (("$YEAR" = "2007") && ($MONTH > 8))))
-            $run = $run --md5 $MD5SUM
-        end
+#            $run = $run --md5 $MD5SUM
+#        end
 	if ($NEBULOUS) 
             $run = $run --nebulous
@@ -463,9 +478,11 @@
         # store the pageName for future reference below
         options $pageName
-
+	
         # create the command line
         if ($VERBOSE > 1)
           echo command $run
         end
+	# More debug:
+#	echo "DEBUG2: " $run
         command $run
     end
@@ -506,5 +523,5 @@
         if ($pztoolClearFault_DB >= $DB:n) set pztoolClearFault_DB = 0
       end
-      periods -exec 600
+      periods -exec 1800
     end
 
