def _document_lock_check(document_id):
 try:
  redis = redis_client(name='default')
  key = _document_lock_key.format(id=document_id)
  return redis.get(key)
 except RedisError as e:
  statsd.incr('redis.errror')
  log.error(('Redis error: %s' % e))
  return None

def _document_lock_check ( document_id ) : try : redis = redis_client ( name = 'default' ) key = _document_lock_key . format ( id = document_id ) return redis . get ( key ) except RedisError as e : statsd . incr ( 'redis.errror' ) log . error ( ( 'Redis error: %s' % e ) ) return None
check for a lock on a document .