Commit 22ddb059 authored by terry%mozilla.org's avatar terry%mozilla.org

Cut down on the number of syncshadowdb processes we fork off.

parent b264e303
......@@ -794,7 +794,8 @@ sub PutHeader {
sub PutFooter {
print PerformSubsts(Param("footerhtml"));
print PerformSubsts(Param("footerhtml"));
SyncAnyPendingShadowChanges();
}
......
......@@ -96,6 +96,15 @@ sub ReconnectToShadowDatabase {
}
}
my $shadowchanges = 0;
sub SyncAnyPendingShadowChanges {
if ($shadowchanges) {
system("./syncshadowdb &");
$shadowchanges = 0;
}
}
my $dosqllog = (-e "data/sqllog") && (-w "data/sqllog");
sub SqlLog {
......@@ -137,7 +146,7 @@ sub SendSQL {
if ($insertid) {
SendSQL("SET LAST_INSERT_ID = $insertid");
}
system("./syncshadowdb &");
$shadowchanges++;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment