Batch multiple updateinventoryfields

Hi there

I want to perform some 700 inventory updates using HTTPFUNCTIONS I have written code to do this, but it only does about 100 products . All the products are iterated so perhaps its a time out. Also it seems as WIX takes time to present the new stock levels when running a query…

There is no timeout error,.

If I do multiple passes in the one JS file i now run into timeouts 504.

Is there a\ proper way of batching the inventory operation? Or can iI extend the timeout period?

I am using CURL so maybe there is a setting there?

See my previous post.

Lawrence

Perhaps → Certified Code Global ← could help you with this question, since as i know he has knowledge about → CURL <–.

Then hope that CCG will discover this post here.

Is there a limit to the number of times a updateinventoryvarientfields can be run in an http-functions.js ?

Also I tried to trap any errors when calling it:

try
{
await updateInventoryVariantFields ( sID , oVariantData );
bUpdated = true ;
}
catch ( err )
{
// handle the error
if ( GsError == “” )
{
GsError = "update inventory error " ;
GsError = GsError . concat ( err . message );
}
bUpdated = false ;
}
return bUpdated ;
}
but when i do get the error message it is just “undefined”, err,name or err.message. What would be undefined? maybe i cannot assume ‘00000.0000…’. It looked as if this was always the case,

Lawrence