Подтвердить трек 2 реальными сбоями, нагрузкой и отчётом

This commit is contained in:
2026-11-20 07:05:16 +03:00
parent 42bf6aa702
commit ef1f470659
43 changed files with 11538 additions and 30 deletions
+11
View File
@@ -10,6 +10,17 @@ from src.storage import storage
def run(args):
action = args['action']
if action == 'anonymous':
import boto3
from botocore import UNSIGNED
from botocore.config import Config
from botocore.exceptions import ClientError
s3 = boto3.client('s3', endpoint_url='http://s3:9000', config=Config(signature_version=UNSIGNED))
try:
s3.get_object(Bucket=BUCKET, Key=f"originals/{args['id']}")
except ClientError as exc:
return exc.response['ResponseMetadata']['HTTPStatusCode']
return 200
if action == 'sql':
with storage.pool.connection() as conn:
cursor = conn.execute(args['query'], args.get('params', []))