Forráskód Böngészése

do not use finish/(

Signed-off-by: Banana <mail@bananas-playground.net>
Banana 1 hete
szülő
commit
a8bdf7dc15
4 módosított fájl, 10 hozzáadás és 9 törlés
  1. 1 0
      TODO
  2. 3 3
      cleanup.pl
  3. 3 3
      fetch.pl
  4. 3 3
      parse-results.pl

+ 1 - 0
TODO

@@ -1,3 +1,4 @@
+Avoid download to mutch data. Content check before?
 Set correct timezone. Maybe in config?
 Some sort of matching against spam domain list?
 A web view for the results?

+ 3 - 3
cleanup.pl

@@ -84,7 +84,7 @@ sayLog($queryStr) if $DEBUG;
 $query = $dbh->prepare($queryStr);
 foreach my $invalidId (@invalidUrls) {
 	$query->execute($invalidId);
-	$query->finish();
+	#$query->finish();
 	sayLog "Removed $invalidId from unique_domain" if $DEBUG;
 }
 sayGreen "Invalid unique_domain removed: ".scalar @invalidUrls;
@@ -103,7 +103,7 @@ while(my @row = $query->fetchrow_array) {
 	my $baseUrl = $row[1];
 	push(@toBeDeletedFromFetchAgain, $baseUrl);
 }
-$query->finish();
+#$query->finish();
 
 sayYellow "Remove baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;
 $queryStr = "DELETE FROM url_to_fetch WHERE `baseurl` = ?";
@@ -111,7 +111,7 @@ sayLog($queryStr) if $DEBUG;
 $query = $dbh->prepare($queryStr);
 foreach my $baseUrl (@toBeDeletedFromFetchAgain) {
 	$query->execute($baseUrl);
-	$query->finish();
+	#$query->finish();
 	sayLog "Removed $baseUrl from url_to_fetch" if $DEBUG;
 }
 sayGreen "Removed baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;

+ 3 - 3
fetch.pl

@@ -59,7 +59,7 @@ $query->execute();
 while(my @row = $query->fetchrow_array) {
 	$urlsToFetch{$row[0]} = $row[1];
 }
-$query->finish();
+#$query->finish();
 
 # successful fetches
 my @urlsFetched;
@@ -130,7 +130,7 @@ sub updateFetched {
 		$query->bind_param(1,$idToUpdate);
 		$query->execute();
 	}
-	$query->finish();
+	#$query->finish();
 	sayGreen "Update fetch timestamps done";
 }
 
@@ -145,6 +145,6 @@ sub updateFailed {
 		$query->bind_param(1,$idToUpdate);
 		$query->execute();
 	}
-	$query->finish();
+	#$query->finish();
 	sayGreen "Update fetch failed done";
 }

+ 3 - 3
parse-results.pl

@@ -68,7 +68,7 @@ $query->execute(@queryIds);
 while(my @row = $query->fetchrow_array) {
 	$baseUrls{$row[0]} = $row[1];
 }
-$query->finish();
+#$query->finish();
 
 
 # get the string to ignore
@@ -80,7 +80,7 @@ $query->execute();
 while(my @row = $query->fetchrow) {
 	push(@urlStringsToIgnore, $row[0])
 }
-$query->finish();
+#$query->finish();
 
 
 ## prepare linkExtor
@@ -194,5 +194,5 @@ sub insertIntoDb {
 
 		#sayLog "Inserted: $link" if($DEBUG);
 	}
-	$query->finish();
+	#$query->finish();
 }