Php )。 $step = 100; $itemCount = GetItemCountByAppId( $appId ); $loopsRequired = $itemCount / $step; $lo
)。Php )。 $step = 100; $itemCount = GetItemCountByAppId( $appId ); $loopsRequired = $itemCount / $step; $lo,php,asynchronous,Php,Asynchronous,)。 $step = 100; $itemCount = GetItemCountByAppId( $appId ); $loopsRequired = $itemCount / $step; $loopsRequired = ceil( $loopsRequired ); $process = array(); for( $a = 0; $a < $loopsRequired; $a++ ) {
$step = 100;
$itemCount = GetItemCountByAppId( $appId );
$loopsRequired = $itemCount / $step;
$loopsRequired = ceil( $loopsRequired );
$process = array();
for( $a = 0; $a < $loopsRequired; $a++ )
{
$items = GetItemsByAppId( $appId, array(
"amount" => $step,
"offset" => ( $step * $a )
) );
foreach( $items[ "items" ] as $key => $item )
{
foreach( $fieldsGroup as $fieldId => $fieldValues )
{
$itemId = $item->__attributes[ "item_id" ];
/*array_push( $process, array(
"itemId" => $itemId,
"fieldId" => $fieldId,
) );*/
UpdateFieldValue( $itemId, $fieldId, $fieldValues );
// This Update function is actually calling the server and I assume it must be waiting for a response... thus my code times out after 30 secs of execution
}
}
//curl_post_async($url, $params);
}