SetRetries() публичный Метод

set distributed retries count and delay
public SetRetries ( $count, $delay )
Пример #1
0
 public function __construct(array $config)
 {
     $this->_sphinx = new \SphinxClient();
     if (isset($config['host'])) {
         if (!isset($config['host'])) {
             $config['port'] = 9312;
         }
         $this->_sphinx->SetServer($config['host'], $config['port']);
     }
     if (isset($config['retries'])) {
         if (!isset($config['delay'])) {
             $config['delay'] = 0;
         }
         $this->_sphinx->SetRetries($config['retries'], $config['delay']);
     }
     if (isset($config['timeout'])) {
         $this->_sphinx->SetConnectTimeout($config['timeout']);
     }
 }
Пример #2
0
<?php

require "sphinxapi.php";
$cl = new SphinxClient();
$cl->SetRetries(10);
$cl->Query('query');
Пример #3
0
<?php

require "spec/fixtures/sphinxapi.php";
$cl = new SphinxClient();
$cl->SetRetries(10, 20);
$cl->AddQuery('test1');
$cl->SetGroupBy('attr', SPH_GROUPBY_DAY);
$cl->AddQuery('test2');
$cl->RunQueries();