Ejemplo n.º 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)));
 }
Ejemplo n.º 2
0
 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)));
 }