예제 #1
0
 public function sendMessage($phones, $content)
 {
     $client = new GearmanClient();
     $client->addServer("219.232.243.98");
     $client->setTimeout(2000);
     if ($client->timeout() > 2000) {
         return false;
     }
     $result = $client->doBackground("sendMessage", json_encode(array('content' => $content, 'phones' => $phones)));
 }
예제 #2
0
파일: User.php 프로젝트: qyt1988528/union
 public function sendPasswordEmailGearman($id, $token, $email)
 {
     $client = new GearmanClient();
     $client->addServer();
     $client->setTimeout(2000);
     if ($client->timeout() > 2000) {
         return false;
     }
     $result = $client->doBackground("sendPasswordEmail", json_encode(array('id' => $id, 'email' => $email, 'token' => $token)));
 }