src/hg/encode/encodeLoad/doEncodeLoad.pl 1.61

1.61 2009/04/06 05:07:22 mikep
try and avoid mysql timeout errors for stuff that takes 14,000 seconds or more
Index: src/hg/encode/encodeLoad/doEncodeLoad.pl
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/encode/encodeLoad/doEncodeLoad.pl,v
retrieving revision 1.60
retrieving revision 1.61
diff -b -B -U 4 -r1.60 -r1.61
--- src/hg/encode/encodeLoad/doEncodeLoad.pl	3 Apr 2009 18:26:53 -0000	1.60
+++ src/hg/encode/encodeLoad/doEncodeLoad.pl	6 Apr 2009 05:07:22 -0000	1.61
@@ -72,8 +72,15 @@
     open(FILE, $file);
     die join("", <FILE>) . "\n";
 }
 
+sub pingMysql
+{
+    my $db = shift;
+    HgAutomate::verbose(2, "pinging mysql (".scalar(localtime()).")\n");
+    $db->execute("select 1");
+}
+
 sub makeCatCmd
 # return the cat command, checking whether the files in the list are all zipped or not
 {
     my $cmdName = shift;
@@ -361,8 +368,9 @@
         if($h->{$field}) {
             $str .= "$field: " . $h->{$field} . "\n";
         }
     }
+    pingMysql($db);
     HgAutomate::verbose(3, "key=[$key] tablename=[$tablename] str=[$str]\n");
     $str .= "\n";
 
     # temporary work-around (XXXX, galt why is this "temporary?").