This commit is contained in:
pwn
2025-12-14 15:03:09 +03:00
parent 5e647e068d
commit a8ce50d1a4
2 changed files with 7 additions and 3 deletions

View File

@@ -9,6 +9,7 @@ import hashlib
import hmac
import re
import secrets
import sys
import time
from dataclasses import dataclass, field
from typing import Dict, List, Optional, Tuple
@@ -173,8 +174,11 @@ class SecurityService:
@staticmethod
async def async_input(prompt: str) -> str:
"""Async input wrapper."""
sys.stdout.write(prompt)
sys.stdout.flush()
loop = asyncio.get_event_loop()
return await loop.run_in_executor(None, input, prompt)
line = await loop.run_in_executor(None, sys.stdin.readline)
return line.rstrip('\n\r')
@staticmethod
def _validate_length(value: str, maximum: int, field_name: str) -> Optional[str]:

View File

@@ -13,8 +13,8 @@ services:
deploy:
resources:
limits:
cpus: '2'
memory: 2G
cpus: '4'
memory: 6G
logging:
driver: "json-file"
options: