forked from mtusi2026/mtusi2026lab6
Проверить сквозной контекст, отказы, SLO и требования уровня 4
This commit is contained in:
+1
-1
@@ -14,7 +14,7 @@ class Handler(BaseHTTPRequestHandler):
|
||||
"clock_timestamp()-min(created_at)),0) AS age FROM attachment_jobs "
|
||||
"WHERE state IN ('queued','processing')").fetchone()
|
||||
windows = {}
|
||||
for window, seconds in [('30s',30),('1m',60),('2m',120),('5m',300)]:
|
||||
for window, seconds in [('15s',15),('30s',30),('1m',60),('2m',120),('5m',300)]:
|
||||
result = conn.execute("SELECT count(*) AS total, count(*) FILTER (WHERE "
|
||||
"state <> 'ready' OR updated_at-created_at > interval '5 seconds') AS bad "
|
||||
"FROM attachments WHERE created_at <= clock_timestamp()-interval '5 seconds' "
|
||||
|
||||
Reference in New Issue
Block a user