We chagne where we connect and disconnect the database in the parent
process in pingest.pl. There's no point connecting at all if the
--pipe option is used.
Signed-off-by: Jason Stephenson <jstephenson@mvlcstaff.org>
Signed-off-by: Bill Erickson <berickxx@gmail.com>
#
# 2) edit the DBI->connect() calls in this program so that it can
# connect to your database.
-my $dbh = DBI->connect('DBI:Pg:');
# Get the input records from either standard input or the database.
my @input;
}
}
} else {
+ my $dbh = DBI->connect('DBI:Pg:');
@input = @{$dbh->selectall_arrayref($q)};
+ $dbh->disconnect();
}
foreach my $r (@input) {
}
$lol[$lists++] = $records if ($count); # Last batch is likely to be
# small.
-$dbh->disconnect();
# We're going to reuse $count to keep track of the total number of
# batches processed.