• Модуль: sender
  • Путь к файлу: ~/bitrix/modules/sender/lib/integration/crm/eventhandler.php
  • Класс: Bitrix\Sender\Integration\Crm\EventHandler
  • Вызов: EventHandler::unlockTimelineQueue
static function unlockTimelineQueue($letterId)
{
	$connection = Application::getInstance()->getConnection();
	if ($connection instanceof DB\MysqlCommonConnection)
	{
		$lockDb = $connection->query(
			"SELECT RELEASE_LOCK('time_line_queue_{$letterId}') as L"
		);
		$lock   = $lockDb->fetch();
		if ($lock["L"] != "0")
		{
			return true;
		}
	}

	return false;
}