verify completed jobs
This commit is contained in:
@@ -41,6 +41,7 @@ $routes->get('/en/wrench/api/v1/startjoblist', 'WrenchApi::apigate');
|
||||
$routes->post('/en/wrench/api/v1/dashdata', 'WrenchApi::apigate');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/getjobsdata', 'WrenchJobs::getJobsData'); //WrenchJobs WrenchApi apigate
|
||||
$routes->post('/en/wrench/api/v1/verifycompleted', 'WrenchJobs::verifyCompletedHx');
|
||||
|
||||
$routes->post('/en/wrench/api/v1/offerslist', 'WrenchApi::apigate');
|
||||
$routes->post('/en/wrench/api/v1/offersresponse', 'WrenchApi::apigate');
|
||||
|
||||
@@ -12,6 +12,25 @@ class WrenchJobs extends BaseController
|
||||
$this->request = $request = \Config\Services::request();
|
||||
}
|
||||
|
||||
public function verifyCompletedHx(){
|
||||
//http://localhost:3033/completedHx
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
$in["action"] = -1;
|
||||
$out=[];
|
||||
$endpoint = "COMPLETED_HX-". $in["uid"];
|
||||
|
||||
$out = $this->getCache($endpoint);
|
||||
if ( count($out)==0 ){
|
||||
$local_url = "http://".$this->micro_service_net1.":3033/completedHx";
|
||||
$out = $this->APIcall('GET', $local_url, $in);
|
||||
$this->saveCache($endpoint,$out,10000);
|
||||
$out['internal_return'] = 0; // just backwad comaptobility
|
||||
log_message('critical', "***** ***** WrenchJobs::verifyCompletedHx Cache Done:::Ret ");
|
||||
}
|
||||
log_message('critical', "***** ***** WrenchJobs::verifyCompletedHx Ret ");
|
||||
return $this->respond( $this->summaryReturnData($in,$out), 200);
|
||||
}
|
||||
public function getJobsData() {
|
||||
$raw_json = file_get_contents('php://input');
|
||||
$in = json_decode($raw_json, true);
|
||||
|
||||
Reference in New Issue
Block a user