Skip to content
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

Fix PHP Recoverable Error in cron job. Move database code to resource mo... #3

Merged
merged 1 commit into from
Sep 28, 2013

Conversation

colinmollenhour
Copy link
Collaborator

...del and do not load logs into memory before deleting them.

I started getting this error after updating:

Recoverable Error: Argument 1 passed to Firegento_Logger_Model_Observer::cleanLogs() must be an instance of Varien_Event_Observer, instance of Mage_Cron_Model_Schedule given in /var/www/..../.modman/Logger/app/code/community/Firegento/Logger/Model/Observer.php on line 22

Also the method of deleting could quite easily run out of memory if the logs got flooded somehow and was generally very inefficient. Loaded all logs into collection with full-blow models and delete individually while not actually reading any of the data..

… model and do not load logs into memory before deleting them.
@daim2k5
Copy link
Member

daim2k5 commented Sep 27, 2013

Hi thanks, can you make a pull request for the "develop" branch?

@colinmollenhour
Copy link
Collaborator Author

It is a hotfix so seems to make sense to put on master and then merge into develop..

daim2k5 added a commit that referenced this pull request Sep 28, 2013
Fix PHP Recoverable Error in cron job. Move database code to resource mo...
@daim2k5 daim2k5 merged commit 93f771c into firegento:master Sep 28, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants