mapreduce/quota.py
def check(self, amount=1):
    """Check that we have enough quota right now.

    This doesn't lock or consume the quota. Following consume might in fact
    fail/succeeded.

    Args:
      amount: amount of quota to check.

    Returns:
      True if we have enough quota to consume specified amount right now. False
      otherwise.
  """
    if self.quota >= amount:
      return True
    return self.quota + self.quota_manager.get(self.bucket) >= amount
Check that we have enough quota right now.

    This doesn't lock or consume the quota. Following consume might in fact
    fail/succeeded.

    Args:
      amount: amount of quota to check.

    Returns:
      True if we have enough quota to consume specified amount right now. False
      otherwise.
  
Check that we have enough quota right now.
This doesn't lock or consume the quota. Following consume might in fact
fail/succeeded.
Check that we have enough quota right now . This doesn ' t lock or consume the quota . Following consume might in fact fail / succeeded .
def check(self, amount=1):
    if self.quota >= amount:
      return True
    return self.quota + self.quota_manager.get(self.bucket) >= amount
def check ( self , amount = 1 ) : if self . quota >= amount : return True return self . quota + self . quota_manager . get ( self . bucket ) >= amount
Check that we have enough quota right now.
Check that we have enough quota right now .
"""Check that we have enough quota right now.

    This doesn't lock or consume the quota. Following consume might in fact
    fail/succeeded.

    Args:
      amount: amount of quota to check.

    Returns:
      True if we have enough quota to consume specified amount right now. False
      otherwise.
  """
True if we have enough quota to consume specified amount right now. False
otherwise.
True if we have enough quota to consume specified amount right now . False otherwise .
self
amount
amount of quota to check.
amount of quota to check .