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 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, 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: