mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-24 13:34:25 +00:00
ban page that throws the error and stuck the crawl queue
This commit is contained in:
parent
5a47c66e55
commit
512bd56056
@ -796,13 +796,32 @@ try {
|
||||
}
|
||||
}
|
||||
|
||||
// Apply changes
|
||||
$db->commit();
|
||||
|
||||
// Process update errors
|
||||
} catch(Exception $e) {
|
||||
|
||||
// Decline DB changes
|
||||
$db->rollBack();
|
||||
|
||||
// Debug std
|
||||
var_dump($e);
|
||||
|
||||
$db->rollBack();
|
||||
// Ban page that throws the error and stuck the crawl queue
|
||||
if (!empty($queueHostPage->hostPageId)) {
|
||||
|
||||
$hostPagesBanned = $db->updateHostPageTimeBanned($queueHostPage->hostPageId, time());
|
||||
|
||||
// Reset counters
|
||||
$hostPagesProcessed = $hostPagesBanned;
|
||||
$manifestsProcessed = 0;
|
||||
$hostPagesIndexed = 0;
|
||||
$manifestsAdded = 0;
|
||||
$hostPagesAdded = 0;
|
||||
$hostsAdded = 0;
|
||||
$hostPagesSnapAdded = 0;
|
||||
}
|
||||
}
|
||||
|
||||
// Debug
|
||||
|
Loading…
x
Reference in New Issue
Block a user