main($this->_listKey, 20, 'JGSMS发送队列'); } public function mainFunc($requestArr){ try{ HelperService::$_startExecTime = microtime(true); HelperService::$_sysParams = $requestArr; $this->_Account = $this->getKey($requestArr['companyCode'],false);//不验证参数 if(empty($this->_Account['JSMS_appKey']) || empty($this->_Account['JSMS_masterSecret'])){ $returnData = [ 'account'=>$this->_Account, 'return'=>'丢弃' ]; HelperService::addLog($returnData,'redis-sms',"JGSMS"); return true; } $smsService = new JGSmsService($this->_Account['JSMS_appKey'],$this->_Account['JSMS_masterSecret']); $res = $smsService->sendMessage($requestArr['mobile'],$requestArr['temp_id'],$requestArr['temp_para']); HelperService::addLog($res,'redis-sms',"JGSMS"); return @json_decode($res,true); } catch (\Exception $ex){ $mailService = new MailService(); $mailService->send('leo',"JGSMS出队异常","",$ex->getMessage(),[['mail'=>'2990412861@qq.com','name'=>'leo.xie']]); } } public function stop(){ Cache::rm($this->_listKey.'_pop_program'); echo "restart success\n"; } public function getCache(){ $salesList = Cache::get($this->_listKey.'_pop_program'); var_dump($salesList); } }