Remove _rollbackAddToPartRepair unused function

This commit is contained in:
DariusIII
2023-03-07 11:13:51 +01:00
parent 1370181927
commit c14af333f7
+9 -31
View File
@@ -333,7 +333,7 @@ class Binaries
// We will use this to subtract so we leave articles for the next time (in case the server doesn't have them yet)
$leaveOver = $this->messageBuffer;
// If this is not a new group, go from our newest to the servers newest.
// If this is not a new group, go from our newest to the servers newest.
} else {
// Set our oldest wanted to our newest local article.
$first = $groupMySQL['last_record'];
@@ -377,14 +377,14 @@ class Binaries
if ($this->_echoCLI) {
$this->colorCli->primary(
(
(int) $groupMySQL['last_record'] === 0
? 'New group '.$groupNNTP['group'].' starting with '.
(
$this->_newGroupScanByDays
? $this->_newGroupDaysToScan.' days'
: number_format($this->_newGroupMessagesToScan).' messages'
).' worth.'
: 'Group '.$groupNNTP['group'].' has '.number_format($realTotal).' new articles.'
(int) $groupMySQL['last_record'] === 0
? 'New group '.$groupNNTP['group'].' starting with '.
(
$this->_newGroupScanByDays
? $this->_newGroupDaysToScan.' days'
: number_format($this->_newGroupMessagesToScan).' messages'
).' worth.'
: 'Group '.$groupNNTP['group'].' has '.number_format($realTotal).' new articles.'
).
' Leaving '.number_format($leaveOver).
" for next pass.\nServer oldest: ".number_format($groupNNTP['first']).
@@ -965,28 +965,6 @@ class Binaries
}
}
/**
* If we failed to insert Collections/Binaries/Parts, rollback the transaction and add the parts to part repair.
*
* @param array $headers Array of headers containing sub-arrays with parts.
* @return array Array of article numbers to add to part repair.
*
* @throws \Exception
* @throws \Throwable
*/
protected function _rollbackAddToPartRepair(array $headers): array
{
$headersNotInserted = [];
foreach ($headers as $header) {
foreach ($header as $file) {
$headersNotInserted[] = $file['Parts']['number'];
}
}
DB::rollBack();
return $headersNotInserted;
}
/**
* Attempt to get missing article headers.
*