I have a periodic importer that parses csv files and applies diffs to stock levels for Commerce products.

Each CSV file contains very few entries (usually around 1-2).

When I run the import manually it works, however when I observe the importer on the production site, it often shows the state as being "Importing %x".

It does not appear to be stuck, as it progresses a few percent but doesn't do anything until 100% is reached.

This may require dozens of cron runs.

Any ideas as to why this happens and what I can to do speed up the imports?

As a result of this, stock levels are regularly out of sync with the back office and people keep ordering products that are out of stock.

Comments

marktheshark’s picture

Issue summary: View changes
gowlj’s picture

how you manage to apply diffs to your stock?
custom rules or tamper plugin?
thanks.

marktheshark’s picture

I have a custom processor that reads the preexisting data before applying an increment or decrement to the stock.

gowlj’s picture

could you be, a bit more specific, or give some reference, because i did't find nothing about this subject.

maybe you mean that after reading original value you modify directly the csv files and then proceed with the import?
thx