chunk save

This commit is contained in:
CHIEFSOFT\ameye
2024-09-13 06:15:25 -04:00
parent 0cf684ba2c
commit 5603be9841
+12 -5
View File
@@ -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 );
}