Esempio n. 1
0
/**
 * Attempts to get a named lock. This function uses a timeout of 1s, but will
 * retry a set number of time.
 * 
 * @see Piwik_Sql::getDbLock
 * 
 * @param string $lockName The lock name.
 * @param int $maxRetries The max number of times to retry.
 * @return bool true if the lock was obtained, false if otherwise.
 */
function Piwik_GetDbLock($lockName, $maxRetries = 30)
{
    return Piwik_Sql::getDbLock($lockName, $maxRetries);
}