mirror of
https://gitlab.com/megazordpobeda/DataRush.git
synced 2026-05-22 23:17:09 +00:00
<type>(scope): <description>
[body] [footer(s)]
This commit is contained in:
@@ -15,7 +15,6 @@ def analyze_data_task(self, submission_id):
|
|||||||
submission = CompetitionTaskSubmission.objects.get(id=submission_id)
|
submission = CompetitionTaskSubmission.objects.get(id=submission_id)
|
||||||
try:
|
try:
|
||||||
code = submission.content.read()
|
code = submission.content.read()
|
||||||
print("YA SSF")
|
|
||||||
files = [
|
files = [
|
||||||
{
|
{
|
||||||
"url": (
|
"url": (
|
||||||
@@ -43,7 +42,7 @@ def analyze_data_task(self, submission_id):
|
|||||||
)
|
)
|
||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
result = response.json()
|
result = response.json()
|
||||||
print("HOHOHO")
|
print(result, response.request)
|
||||||
|
|
||||||
submission.stdout.save("output.txt", ContentFile(result["output"]))
|
submission.stdout.save("output.txt", ContentFile(result["output"]))
|
||||||
submission.result = {
|
submission.result = {
|
||||||
@@ -59,6 +58,7 @@ def analyze_data_task(self, submission_id):
|
|||||||
except httpx.RequestError:
|
except httpx.RequestError:
|
||||||
self.retry(countdown=2**self.request.retries)
|
self.retry(countdown=2**self.request.retries)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
print(e)
|
||||||
submission.result = {"error": str(e), "success": False}
|
submission.result = {"error": str(e), "success": False}
|
||||||
submission.status = CompetitionTaskSubmission.StatusChoices.CHECKED
|
submission.status = CompetitionTaskSubmission.StatusChoices.CHECKED
|
||||||
submission.earned_points = 0
|
submission.earned_points = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user