protected $_batchSize = 500;
protected $_url = null;
protected static $minTimeBetweenRequests = 2;
+ protected $_log = false;
/**
* Create a new job instance.
*/
- public function __construct($batchSize = 500, $url = null)
+ public function __construct($batchSize = 500, $url = null, $log = false)
{
$this->_batchSize = $batchSize;
$this->_url = $url;
+ $this->_log = $log;
}
public function handle()
} else {
$res = HTTP::getResponseCode($url, 10, 'http://paris.cubedesigners.com:8191/v1');
}
- Log::info('Tested ' . $url . ': ' . $res['http_code']);
+ if ($this->_log) {
+ Log::info('Tested ' . $url . ': ' . $res['http_code']);
+ }
if ($res['http_code'] != $previousCode) {
$res['code_date'] = new \DateTime();