BlackbitDigitalCommerce / pimcore-data-director

Import Bundle for Pimcore
16 stars 3 forks source link

Step 2 is not running when accessing dataport via API #75

Open betterapp opened 1 year ago

betterapp commented 1 year ago

I have a dataport.

When I click on Start Complete Export button the result is:

image

And I can download file with data.

When I try to access this export via API call the result is:

image

Second step is not running and I get empty file.

Why ?

DD: 3.2.35

BlackbitDevs commented 1 year ago

This happens when the cache is being used. The response documents get cached on the server. When export recognizes that since last execution with the given input parameters, nothing has changed in the data, then the result from the cache gets delivered and step 2 of the export gets completely skipped. When the export gets executed manually, it gets executed with force=1. In this case the cache does not get used. This is why you see different behaviour. The question now is, why you get an empty file.

For now, could you please remove all files in var/cache/BlackbitDataDirector/? Afterwards it should work. To completely bypass the caching behaviour you can provide force=1 in your REST API request - but actually it would be better for performance reasons if it worked without this. So if this happens again, even if you have cleaned all the cache files in var/cache/BlackbitDataDirector/, please notify me again here.

betterapp commented 1 year ago

Yes. After clearing cache it is working. But why I needed to clear the cache ?

BlackbitDevs commented 1 year ago

When you got an empty response document, the reason was that in a previous export this empty response document got cached. So maybe there is a problem with cache pruning but you are the first who notifies me about this. To eliminate the possible cause that a debug statement in one of your callback functions was responsible, it was necessary to clear the cache. If the problem does not occur again, everything is fine. If it does occur again, please notify me, then I will take a closer look.