• Модуль: transformer
  • Путь к файлу: ~/bitrix/modules/transformer/lib/http.php
  • Класс: BitrixTransformerHttp
  • Вызов: Http::shouldWeSend
private function shouldWeSend()
{
	$timeSearchConnectionErrors = 1800;
	$errorCountForStopSend = 5;

	$errorCount = CommandTable::getList(array(
		'select' => array('CNT'),
		'filter' => array('=ERROR' => self::CONNECTION_ERROR, '>UPDATE_TIME' => DateTime::createFromTimestamp(time() - $timeSearchConnectionErrors)),
		'runtime' => array(
			new ExpressionField('CNT', 'COUNT(*)')
		),
	))->fetch();

	return ($errorCount['CNT'] < $errorCountForStopSend);
}