-
-
Notifications
You must be signed in to change notification settings - Fork 449
Added log when currency rates import fail #3616
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
* @throws Mage_Core_Exception | ||
*/ | ||
public function scheduledUpdateCurrencyRates() | ||
public function scheduledUpdateCurrencyRates($cron = null) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pls dont change signatures of used methods. Better implement new ones.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
if (func_num_args() && func_get_args()[0] instanceof Mage_Cron_Model_Schedule) {
$schedule = func_get_args()[0];
//....
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd add a new method w/ parameter and all logic in and forward to this method. Similiar i did with #2940.
For BC, it's tricky to remove entries in the translation file |
Since the original author didn't answer any of the notes I'll close this PR. |
Description
When currency cron "Scheduled Import Settings" is enabled, in System > Configuration > Currency Setup, when there is an import error, errors are not logged.
With this PR, error is logged in exception.log (
Mage::logException
), cron job is marked as "error" ($cron->setIsError
), and cron message contains the error log.Contribution checklist