mirror of
https://github.com/YGGverse/YGGo.git
synced 2025-01-08 22:07:56 +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();
|
$db->commit();
|
||||||
|
|
||||||
|
// Process update errors
|
||||||
} catch(Exception $e) {
|
} catch(Exception $e) {
|
||||||
|
|
||||||
|
// Decline DB changes
|
||||||
|
$db->rollBack();
|
||||||
|
|
||||||
|
// Debug std
|
||||||
var_dump($e);
|
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
|
// Debug
|
||||||
|
Loading…
Reference in New Issue
Block a user