From a8bdf7dc15d1432788a80e1ae08c1b17ba83f25a Mon Sep 17 00:00:00 2001 From: Banana Date: Sat, 7 Sep 2024 15:42:40 +0200 Subject: [PATCH] do not use finish/( Signed-off-by: Banana --- TODO | 1 + cleanup.pl | 6 +++--- fetch.pl | 6 +++--- parse-results.pl | 6 +++--- 4 files changed, 10 insertions(+), 9 deletions(-) diff --git a/TODO b/TODO index c51e172..613e35e 100644 --- a/TODO +++ b/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? diff --git a/cleanup.pl b/cleanup.pl index d0f515a..0a3a34d 100644 --- a/cleanup.pl +++ b/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; diff --git a/fetch.pl b/fetch.pl index d9fa7d2..3e3c096 100644 --- a/fetch.pl +++ b/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"; } diff --git a/parse-results.pl b/parse-results.pl index 50e60bb..b2be62d 100644 --- a/parse-results.pl +++ b/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(); } -- 2.39.5