Browse Source

do not use finish/(

Signed-off-by: Banana <mail@bananas-playground.net>
Banana 1 week ago
parent
commit
a8bdf7dc15
4 changed files with 10 additions and 9 deletions
  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?
 Set correct timezone. Maybe in config?
 Some sort of matching against spam domain list?
 Some sort of matching against spam domain list?
 A web view for the results?
 A web view for the results?

+ 3 - 3
cleanup.pl

@@ -84,7 +84,7 @@ sayLog($queryStr) if $DEBUG;
 $query = $dbh->prepare($queryStr);
 $query = $dbh->prepare($queryStr);
 foreach my $invalidId (@invalidUrls) {
 foreach my $invalidId (@invalidUrls) {
 	$query->execute($invalidId);
 	$query->execute($invalidId);
-	$query->finish();
+	#$query->finish();
 	sayLog "Removed $invalidId from unique_domain" if $DEBUG;
 	sayLog "Removed $invalidId from unique_domain" if $DEBUG;
 }
 }
 sayGreen "Invalid unique_domain removed: ".scalar @invalidUrls;
 sayGreen "Invalid unique_domain removed: ".scalar @invalidUrls;
@@ -103,7 +103,7 @@ while(my @row = $query->fetchrow_array) {
 	my $baseUrl = $row[1];
 	my $baseUrl = $row[1];
 	push(@toBeDeletedFromFetchAgain, $baseUrl);
 	push(@toBeDeletedFromFetchAgain, $baseUrl);
 }
 }
-$query->finish();
+#$query->finish();
 
 
 sayYellow "Remove baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;
 sayYellow "Remove baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;
 $queryStr = "DELETE FROM url_to_fetch WHERE `baseurl` = ?";
 $queryStr = "DELETE FROM url_to_fetch WHERE `baseurl` = ?";
@@ -111,7 +111,7 @@ sayLog($queryStr) if $DEBUG;
 $query = $dbh->prepare($queryStr);
 $query = $dbh->prepare($queryStr);
 foreach my $baseUrl (@toBeDeletedFromFetchAgain) {
 foreach my $baseUrl (@toBeDeletedFromFetchAgain) {
 	$query->execute($baseUrl);
 	$query->execute($baseUrl);
-	$query->finish();
+	#$query->finish();
 	sayLog "Removed $baseUrl from url_to_fetch" if $DEBUG;
 	sayLog "Removed $baseUrl from url_to_fetch" if $DEBUG;
 }
 }
 sayGreen "Removed baseurls from url_to_fetch: ".scalar @toBeDeletedFromFetchAgain;
 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) {
 while(my @row = $query->fetchrow_array) {
 	$urlsToFetch{$row[0]} = $row[1];
 	$urlsToFetch{$row[0]} = $row[1];
 }
 }
-$query->finish();
+#$query->finish();
 
 
 # successful fetches
 # successful fetches
 my @urlsFetched;
 my @urlsFetched;
@@ -130,7 +130,7 @@ sub updateFetched {
 		$query->bind_param(1,$idToUpdate);
 		$query->bind_param(1,$idToUpdate);
 		$query->execute();
 		$query->execute();
 	}
 	}
-	$query->finish();
+	#$query->finish();
 	sayGreen "Update fetch timestamps done";
 	sayGreen "Update fetch timestamps done";
 }
 }
 
 
@@ -145,6 +145,6 @@ sub updateFailed {
 		$query->bind_param(1,$idToUpdate);
 		$query->bind_param(1,$idToUpdate);
 		$query->execute();
 		$query->execute();
 	}
 	}
-	$query->finish();
+	#$query->finish();
 	sayGreen "Update fetch failed done";
 	sayGreen "Update fetch failed done";
 }
 }

+ 3 - 3
parse-results.pl

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