X-Git-Url: https://ruin.nu/git/?a=blobdiff_plain;f=scripts%2Fscans.pl;h=e9795f7eba5e87e49b131481289fdc9671494fa4;hb=5b6c3c7d0003d636c1c3da6d25734e4aad5736a5;hp=30bd8bebe5afa165b3f33a8eab1267c520f1c721;hpb=13e3df1e4218c19325ef732a4a2cb2b7db79a69c;p=ndwebbie.git diff --git a/scripts/scans.pl b/scripts/scans.pl index 30bd8be..e9795f7 100755 --- a/scripts/scans.pl +++ b/scripts/scans.pl @@ -81,6 +81,8 @@ $dbh->pg_savepoint('scans') or die "No savepoint"; my %production = (None => 0, Low => 35, Medium => 65, High => 100); while (my $scan = $newscans->fetchrow_hashref){ + $dbh->pg_release('scans') or die "Couldn't save"; + $dbh->pg_savepoint('scans') or die "Couldn't save"; my $file = get("http://game.planetarion.com/showscan.pl?scan_id=$scan->{scan_id}"); next unless defined $file; if ($file =~ /((?:\w| )*) (?:Scan|Probe) on (\d+):(\d+):(\d+) in tick (\d+)/){ @@ -192,8 +194,6 @@ while (my $scan = $newscans->fetchrow_hashref){ print "Something wrong with scan $scan->{id} type $type at tick $tick http://game.planetarion.com/showscan.pl?scan_id=$scan->{scan_id}"; } $parsedscan->execute($tick,$type,$planet,$scan->{id}) or die $dbh->errstr; - $dbh->pg_release('scans') or die "Couldn't save"; - $dbh->pg_savepoint('scans') or die "Couldn't save"; #$dbh->rollback; }; if ($@) {