mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-23 22:37:10 +00:00
Merge branch 'master' of https://gitlab.prodcontest.ru/team-15/project
This commit is contained in:
@@ -41,7 +41,7 @@ http_addr =
|
|||||||
http_port = 3000
|
http_port = 3000
|
||||||
|
|
||||||
# The public facing domain name used to access grafana from a browser
|
# 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
|
# Redirect to correct domain if host header does not match domain
|
||||||
# Prevents DNS rebinding attacks
|
# Prevents DNS rebinding attacks
|
||||||
|
|||||||
@@ -108,6 +108,11 @@ def submit_task(
|
|||||||
UserAchievement.objects.create(
|
UserAchievement.objects.create(
|
||||||
user=user, achievement=first_steps_achievement
|
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:
|
if task.type == CompetitionTask.CompetitionTaskType.INPUT:
|
||||||
submission = CompetitionTaskSubmission.objects.create(
|
submission = CompetitionTaskSubmission.objects.create(
|
||||||
user=user,
|
user=user,
|
||||||
|
|||||||
@@ -202,7 +202,6 @@ async def execute_code(request: ExecutionRequest) -> ExecutionResponse:
|
|||||||
)
|
)
|
||||||
|
|
||||||
with tempfile.TemporaryDirectory() as tmp_dir:
|
with tempfile.TemporaryDirectory() as tmp_dir:
|
||||||
print(tmp_dir)
|
|
||||||
bound_files = {}
|
bound_files = {}
|
||||||
if request.files:
|
if request.files:
|
||||||
async with aiohttp.ClientSession() as session:
|
async with aiohttp.ClientSession() as session:
|
||||||
|
|||||||
Reference in New Issue
Block a user