Patch
This commit is contained in:
@@ -9,6 +9,7 @@ import hashlib
|
|||||||
import hmac
|
import hmac
|
||||||
import re
|
import re
|
||||||
import secrets
|
import secrets
|
||||||
|
import sys
|
||||||
import time
|
import time
|
||||||
from dataclasses import dataclass, field
|
from dataclasses import dataclass, field
|
||||||
from typing import Dict, List, Optional, Tuple
|
from typing import Dict, List, Optional, Tuple
|
||||||
@@ -173,8 +174,11 @@ class SecurityService:
|
|||||||
@staticmethod
|
@staticmethod
|
||||||
async def async_input(prompt: str) -> str:
|
async def async_input(prompt: str) -> str:
|
||||||
"""Async input wrapper."""
|
"""Async input wrapper."""
|
||||||
|
sys.stdout.write(prompt)
|
||||||
|
sys.stdout.flush()
|
||||||
loop = asyncio.get_event_loop()
|
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
|
@staticmethod
|
||||||
def _validate_length(value: str, maximum: int, field_name: str) -> Optional[str]:
|
def _validate_length(value: str, maximum: int, field_name: str) -> Optional[str]:
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ services:
|
|||||||
deploy:
|
deploy:
|
||||||
resources:
|
resources:
|
||||||
limits:
|
limits:
|
||||||
cpus: '2'
|
cpus: '4'
|
||||||
memory: 2G
|
memory: 6G
|
||||||
logging:
|
logging:
|
||||||
driver: "json-file"
|
driver: "json-file"
|
||||||
options:
|
options:
|
||||||
|
|||||||
Reference in New Issue
Block a user