fix(dark-tariff): throttle repeated check_start brute-force attempts
This commit is contained in:
1 parent
d8a89610cd
commit
f5083397e6
3 files changed
+15
-3
No files matched your search
@@ -47,6 +47,12 @@ async def chat_greeting():
|
||||
async def check_start(reading_id):
|
||||
return await call("select chat.check_start(%s::bigint)", (reading_id,))
|
||||
|
||||
async def incomplete_checks(reading_id):
|
||||
return await call(
|
||||
"select count(*) from chat.check_session where reading_id = %s::bigint and not complete",
|
||||
(reading_id,),
|
||||
)
|
||||
|
||||
async def check_commit(check_id, round, values):
|
||||
return await call("select chat.check_commit(%s::uuid, %s::int, %s::text[])", (check_id, round, values))
|
||||
|
||||
|
||||
Reference in new issue
Block a user