Skip to content

Instantly share code, notes, and snippets.

@kalenjordan
Last active August 29, 2015 14:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kalenjordan/73ed6492fe3d67b09121 to your computer and use it in GitHub Desktop.
Save kalenjordan/73ed6492fe3d67b09121 to your computer and use it in GitHub Desktop.

Inefficient Order Processing over Cron

I was able to run update_availability_status, update_sales_history, and execute_tasks without any issues, and I have them enabled with a cron running every 5 minutes.

I can bump the processing frequency up to 2 minutes as mentioned in the docs, if needed. But that shouldn't be necessary for the module to function, it should just increase the freshness of data.

I ran into a problem with the update_stocks task though. It's hitting a memory limit because of a very inefficient query. I traced it back to MDN_AdvancedStock_Helper_Product_Base on line 130. In my case I have like 14k order IDs that it's attempting to query.

It should be splitting the processing up in to chunks. Perhaps this is related to the problems in the initial order preparation step. Let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment