diff --git a/neuralink/build/service/security_service_async.py b/neuralink/build/service/security_service_async.py index ea52644..7d50180 100644 --- a/neuralink/build/service/security_service_async.py +++ b/neuralink/build/service/security_service_async.py @@ -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]: diff --git a/neuralink/docker-compose.yml b/neuralink/docker-compose.yml index d817241..68c6250 100644 --- a/neuralink/docker-compose.yml +++ b/neuralink/docker-compose.yml @@ -13,8 +13,8 @@ services: deploy: resources: limits: - cpus: '2' - memory: 2G + cpus: '4' + memory: 6G logging: driver: "json-file" options: