feat: added achievements

This commit is contained in:
Андрей Сумин
2025-03-03 01:54:20 +03:00
parent 0b032100f8
commit ab90d362a2
26 changed files with 163 additions and 37 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ class CompetitionTaskSubmissionAdmin(admin.ModelAdmin):
"user__username",
"user__email",
)
list_filter = ("plagiarism_checked", "status",)
list_filter = ("plagiarism_checked", "status")
ordering = ["-timestamp"]
def has_add_permission(self, request, obj=None):
@@ -1,4 +1,4 @@
# Generated by Django 5.1.6 on 2025-03-02 21:24
# Generated by Django 5.1.6 on 2025-03-02 22:53
import apps.task.models
import django.db.models.deletion
+2 -3
View File
@@ -1,8 +1,7 @@
import httpx
from celery import shared_task
from django.core.files.base import ContentFile
from django.conf import settings
from django.core.files.base import ContentFile
@shared_task(bind=True, max_retries=3)
@@ -40,7 +39,7 @@ def analyze_data_task(self, submission_id):
)
submission.status = CompetitionTaskSubmission.StatusChoices.CHECKED
except httpx.RequestError as e:
except httpx.RequestError:
self.retry(countdown=2**self.request.retries)
except Exception as e:
submission.result = {"error": str(e), "success": False}