I have a small bug and have no clue where or how to debug. I have one cron task which runs on production but stops or stuck always on one method. On local env it works like a charm, but on prod not. Here is my code:
$stores = Mage::app()->getStores();
foreach ($stores as $store) {
if ($store->getIsActive()) {
Mage::log("store ID " . $store->getId() . ": " . $store->getCode(), null, 'myextension.log');
// call update check
Mage::log( "before runUpdateCheck()", null, 'myextension.log');
$update_done = Mage::helper('privacypolicy/service')->runUpdateCheck($store);
Mage::log( "after runUpdateCheck()", null, 'myextension.log');
if ($update_done AND ! $updated) {
$updated = true;
}
}
Mage::log('Cron: Update check finished', null, 'myextension.log');
}
So it works until $update_done = Mage::helper('privacypolicy/service')->runUpdateCheck($store);
Then nothing happened. Tried to add logging into this method. Nothing happened.
As I mentioned above - on local it works fine. Have no idea how to fix it on prod.
PHP 5.5.9-1ubuntu4.20 (cli) (built: Oct 3 2016 13:00:37)