[Improved] Logic
This commit is contained in:
parent
d278e99172
commit
c91bb682af
@ -148,14 +148,7 @@ if (!$setting->setValue('pps_last_share_id', $iLastShareId)) {
|
|||||||
|
|
||||||
// Fetch all unaccounted blocks
|
// Fetch all unaccounted blocks
|
||||||
$log->logInfo("\tFetching unaccounted blocks.");
|
$log->logInfo("\tFetching unaccounted blocks.");
|
||||||
if (!$aAllBlocks = $block->getAllUnaccounted('ASC')) {
|
if ($aAllBlocks = $block->getAllUnaccounted('ASC')) {
|
||||||
$log->logInfo("Failed to fetch unaccounted Blocks. NOTICE: " . $block->getCronError());
|
|
||||||
}
|
|
||||||
if (empty($aAllBlocks)) {
|
|
||||||
$log->logInfo("\tNo new blocks.");
|
|
||||||
// No monitoring event here, not fatal for PPS
|
|
||||||
}
|
|
||||||
|
|
||||||
// Go through blocks and archive/delete shares that have been accounted for
|
// Go through blocks and archive/delete shares that have been accounted for
|
||||||
foreach ($aAllBlocks as $iIndex => $aBlock) {
|
foreach ($aAllBlocks as $iIndex => $aBlock) {
|
||||||
// If we are running through more than one block, check for previous share ID
|
// If we are running through more than one block, check for previous share ID
|
||||||
@ -203,6 +196,14 @@ foreach ($aAllBlocks as $iIndex => $aBlock) {
|
|||||||
}
|
}
|
||||||
$log->logInfo("\t$aBlock['id']\t Block paid and accounted for.");
|
$log->logInfo("\t$aBlock['id']\t Block paid and accounted for.");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else if (empty($aAllBlocks)) {
|
||||||
|
$log->logInfo("\tNo new blocks.");
|
||||||
|
// No monitoring event here, not fatal for PPS
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$log->logInfo("Failed to fetch unaccounted Blocks. NOTICE: " . $block->getCronError());
|
||||||
|
}
|
||||||
$log->logInfo("Completed PPS Payout");
|
$log->logInfo("Completed PPS Payout");
|
||||||
|
|
||||||
require_once('cron_end.inc.php');
|
require_once('cron_end.inc.php');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user