From daee9a87c1f85f26943aca389d70940a5faad86a Mon Sep 17 00:00:00 2001 From: Neozonz Date: Mon, 20 Jan 2014 23:06:03 -0500 Subject: [PATCH] [FIX] Call correct getCronError functions --- cronjobs/payouts.php | 6 +++--- cronjobs/pplns_payout.php | 6 +++--- cronjobs/pps_payout.php | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/cronjobs/payouts.php b/cronjobs/payouts.php index 27dbd8f1..9a8081c6 100755 --- a/cronjobs/payouts.php +++ b/cronjobs/payouts.php @@ -88,7 +88,7 @@ if ($setting->getValue('disable_manual_payouts') != 1) { $monitoring->endCronjob($cron_name, 'E0065', 1, true); } } else { - $log->logFatal('Failed to add new Debit_MP transaction in database for user ' . $user->getUserName($aData['account_id']) . ' ERROR: ' . $notification->getCronError());); + $log->logFatal('Failed to add new Debit_MP transaction in database for user ' . $user->getUserName($aData['account_id']) . ' ERROR: ' . $transaction->getCronError());); $monitoring->endCronjob($cron_name, 'E0064', 1, true); } } @@ -102,7 +102,7 @@ if ($setting->getValue('disable_manual_payouts') != 1) { if ($setting->getValue('disable_auto_payouts') != 1) { // Fetch all users balances if (!$users = $transaction->getAPQueue()) { - $log->logFatal("\tFailed Processing Auto Payment Payment Queue. ERROR: " . $share->getCronError()); + $log->logFatal("\tFailed Processing Auto Payment Payment Queue. ERROR: " . $transaction->getCronError()); $monitoring->endCronjob($cron_name, 'E0050', 1, true); } if (count($users) > 0) $log->logDebug(" found " . count($users) . " queued payout(s)"); @@ -144,7 +144,7 @@ if ($setting->getValue('disable_auto_payouts') != 1) { $monitoring->endCronjob($cron_name, 'E0065', 1, true); } } else { - $log->logFatal('Failed to add new Debit_AP transaction in database for user ' . $user->getUserName($aUserData['id']) . ' ERROR: ' . $notification->getCronError()); + $log->logFatal('Failed to add new Debit_AP transaction in database for user ' . $user->getUserName($aUserData['id']) . ' ERROR: ' . $transaction->getCronError()); $monitoring->endCronjob($cron_name, 'E0064', 1, true); } } diff --git a/cronjobs/pplns_payout.php b/cronjobs/pplns_payout.php index c8e6626a..208c20c9 100755 --- a/cronjobs/pplns_payout.php +++ b/cronjobs/pplns_payout.php @@ -106,7 +106,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { // Grab only the most recent shares from Archive that fill the missing shares $log->logInfo('Fetching ' . ($pplns_target - $iRoundShares) . ' additional shares from archive'); if (!$aArchiveShares = $share->getArchiveShares($pplns_target - $iRoundShares)) { - $log->logError('Failed to fetch shares from archive, setting target to round total'); + $log->logError('Failed to fetch shares from archive, setting target to round total. Error: ' . $share->getCronError()); $pplns_target = $iRoundShares; } else { // Add archived shares to users current shares, if we have any in archive @@ -236,10 +236,10 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { // Move counted shares to archive before this blockhash upstream share if (!$share->moveArchive($iCurrentUpstreamId, $aBlock['id'], $iPreviousShareId)) - $log->logError('Failed to copy shares to archive table: ' . $share->getCronError() . ': ' . $share->getCronError()); + $log->logError('Failed to copy shares to archive table: ' . $iPreviousShareId . ' to ' . $iCurrentUpstreamId . ' aborting! Error: ' . $share->getCronError()); // Delete all accounted shares if (!$share->deleteAccountedShares($iCurrentUpstreamId, $iPreviousShareId)) { - $log->logFatal("Failed to delete accounted shares from $iPreviousShareId to $iCurrentUpstreamId, aborting! Error: " . $share->getCronError()); + $log->logFatal("Failed to delete accounted shares from " . $iPreviousShareId . " to " . $iCurrentUpstreamId . " aborting! Error: " . $share->getCronError()); $monitoring->endCronjob($cron_name, 'E0016', 1, true); } // Mark this block as accounted for diff --git a/cronjobs/pps_payout.php b/cronjobs/pps_payout.php index 13fb92cb..8c1e928f 100755 --- a/cronjobs/pps_payout.php +++ b/cronjobs/pps_payout.php @@ -182,7 +182,7 @@ foreach ($aAllBlocks as $iIndex => $aBlock) { $log->logInfo("\tMove shares to archive..."); if ($aBlock['share_id'] < $iLastShareId) { if (!$share->moveArchive($aBlock['share_id'], $aBlock['id'], @$iLastBlockShare)) - $log->logError("Failed to copy shares to archive: " . $share->getCronError() . ': ' . $share->getCronError()); + $log->logError("Failed to copy shares to from " . $aBlock['share_id'] . " to " . $iLastBlockShare . ' Error: ' . $share->getCronError()); } // Delete shares $log->logInfo("\tDelete accounted shares...");