chunk save
This commit is contained in:
@@ -36,7 +36,7 @@ class WrenchUserContacts extends BaseController
|
||||
if (isset($in["uid"]) && $in["uid"] !='' ){
|
||||
$in["member_uid"]=$in["uid"];
|
||||
}
|
||||
|
||||
$time_to_save = false;
|
||||
$endpoint = "CONTACTS_IMPORT_ACTION-". $in["uid"];
|
||||
$outC = $this->getCache($endpoint); // try find in cache
|
||||
if ( $in["mmode"] == 0 ){
|
||||
@@ -54,15 +54,22 @@ class WrenchUserContacts extends BaseController
|
||||
Fire process events
|
||||
save to the backend database;
|
||||
*/
|
||||
if ($in["csize"] >= $in["pcount"]){
|
||||
$time_to_save = true;
|
||||
}
|
||||
}
|
||||
|
||||
///=== cache game gere
|
||||
|
||||
$in["raw_contacts"] = serialize($in['raw_contacts'].$in["m2"].$in["m3"]);
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
if( $time_to_save == true){
|
||||
$in["raw_contacts"] = serialize($in['raw_contacts']);
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
}
|
||||
else{
|
||||
$out["status_msg"] = "Received and cached";
|
||||
}
|
||||
log_message('critical', "*********** WrenchUserContacts::usersContacts() 0001 ".serialize($out) );
|
||||
|
||||
return $this->summaryReturnData($in,$out); //json_encode( $final_out );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user