From 9033d72dff503886c6e83a521ca3402cc8f5afcc Mon Sep 17 00:00:00 2001 From: ITQ Date: Mon, 3 Mar 2025 14:57:38 +0300 Subject: [PATCH 1/3] rustpobeda --- infrastructure/grafana/grafana.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/infrastructure/grafana/grafana.ini b/infrastructure/grafana/grafana.ini index 86cb5f8..2af2169 100644 --- a/infrastructure/grafana/grafana.ini +++ b/infrastructure/grafana/grafana.ini @@ -41,7 +41,7 @@ http_addr = http_port = 3000 # The public facing domain name used to access grafana from a browser -domain = localhost +domain = prod-team-15-2pc0i3lc.final.prodcontest.ru # Redirect to correct domain if host header does not match domain # Prevents DNS rebinding attacks From d2408a2d5e61b89109b695598fd418ba4944d388 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BD=D0=B4=D1=80=D0=B5=D0=B9=20=D0=A1=D1=83=D0=BC?= =?UTF-8?q?=D0=B8=D0=BD?= Date: Mon, 3 Mar 2025 15:02:11 +0300 Subject: [PATCH 2/3] feat: added max attempts handling --- services/backend/api/v1/task/views.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/services/backend/api/v1/task/views.py b/services/backend/api/v1/task/views.py index 9a57a7f..d34d88e 100644 --- a/services/backend/api/v1/task/views.py +++ b/services/backend/api/v1/task/views.py @@ -108,6 +108,11 @@ def submit_task( UserAchievement.objects.create( user=user, achievement=first_steps_achievement ) + + total_attempts = CompetitionTaskSubmission.objects.filter(user=user, task=task).count() + if task.max_attempts == total_attempts: + return status.FORBIDDEN, ForbiddenError() + if task.type == CompetitionTask.CompetitionTaskType.INPUT: submission = CompetitionTaskSubmission.objects.create( user=user, From c98a25b62a0fd123c15007a205c91314755ebb5e Mon Sep 17 00:00:00 2001 From: ITQ Date: Mon, 3 Mar 2025 15:03:16 +0300 Subject: [PATCH 3/3] (scope): [body] [footer(s)] --- services/checker/main.py | 1 - 1 file changed, 1 deletion(-) diff --git a/services/checker/main.py b/services/checker/main.py index 557fdba..a1d05fa 100644 --- a/services/checker/main.py +++ b/services/checker/main.py @@ -202,7 +202,6 @@ async def execute_code(request: ExecutionRequest) -> ExecutionResponse: ) with tempfile.TemporaryDirectory() as tmp_dir: - print(tmp_dir) bound_files = {} if request.files: async with aiohttp.ClientSession() as session: