<type>(scope): <description>

[body]

[footer(s)]
This commit is contained in:
ITQ
2025-03-04 03:50:38 +03:00
parent afccac6928
commit 0b94e3d644
+6 -7
View File
@@ -28,11 +28,6 @@ def analyze_data_task(self, submission_id):
) )
] ]
print(
hashlib.sha256(
submission.task.correct_answer_file.read()
).hexdigest()
)
response = httpx.post( response = httpx.post(
f"{settings.CHECKER_API_ENDPOINT}/execute", f"{settings.CHECKER_API_ENDPOINT}/execute",
json={ json={
@@ -47,9 +42,13 @@ def analyze_data_task(self, submission_id):
) )
response.raise_for_status() response.raise_for_status()
result = response.json() result = response.json()
print(result, response.request) print(result)
submission.stdout.save("output.txt", ContentFile(result["output"])) submission.stdout = ContentFile(
bytes(result["output"]),
"output.txt",
)
submission.stdout.save()
submission.result = { submission.result = {
"correct": result["hash_match"], "correct": result["hash_match"],
"hash_match": result["hash_match"], "hash_match": result["hash_match"],