gpu info for xpu and log exclude list

Signed-off-by: vladmandic <mandic00@live.com>
This commit is contained in:
vladmandic
2026-03-19 15:01:49 +01:00
parent 97a16e5eb9
commit 87659823fc
4 changed files with 16 additions and 6 deletions
+6
View File
@@ -29,6 +29,8 @@ log_cost = {
"/sdapi/v1/platform": 60,
"/sdapi/v1/checkpoint": 60,
}
log_exclude_suffix = ['.css', '.js', '.ico', '.svg']
log_exclude_prefix = ['/assets']
class Limiter():
def __init__(self, limit):
@@ -65,6 +67,10 @@ class Limiter():
def check_log(self, client: str, api: str):
if self.log_limit < 0:
return True
if any(api.endswith(s) for s in log_exclude_suffix):
return False
if any(api.startswith(s) for s in log_exclude_prefix):
return False
cost = log_cost.get(api, 1)
if cost < 0:
return False