def is_space_quota_healthy(total, used):
  try:
    # remaining < 1G or used ratio > 80% means not healthy
    if (int(total) - int(used)) < 1024*1024*1024 \
      or float(used) / float(total) > 0.8:
      return False
  except Exception, e:
    pass
  return True
dataset/ETHPy150Open XiaoMi/minos/owl/utils/quota_util.py/is_space_quota_healthy/original