Fix cache
This commit is contained in:
@@ -17,9 +17,16 @@ class WrenchJobs extends BaseController
|
||||
$in = json_decode($raw_json, true);
|
||||
$in["action"] = WRENCHBOARD_JOB_STATS_INTEREST;
|
||||
$out=[];
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$out['internal_return'] = $ret;
|
||||
log_message('critical', "***** ***** WrenchJobs::interestStats Ret = ".$ret );
|
||||
$endpoint = "CLIENT_STATS-". $in["client_id"];
|
||||
|
||||
$out = $this->getCache($endpoint);
|
||||
if ( count($out)==0 ){
|
||||
$ret = $this->wrenchboard->wrenchboard_api($in, $out);
|
||||
$this->saveCache($endpoint,$out,15000);
|
||||
$out['internal_return'] = $ret;
|
||||
log_message('critical', "***** ***** WrenchJobs::interestStats Cache Done:::Ret ". $ret);
|
||||
}
|
||||
log_message('critical', "***** ***** WrenchJobs::interestStats Ret ");
|
||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user