mirror of
https://github.com/Ai-hack-MAGNUM-OPUS/backend.git
synced 2024-11-26 02:03:43 +03:00
13 lines
321 B
Python
13 lines
321 B
Python
|
from django.db.models.signals import post_save
|
||
|
from django.dispatch import receiver
|
||
|
|
||
|
from checker.models import Docx
|
||
|
from checker.tasks import process_file
|
||
|
|
||
|
|
||
|
@receiver(post_save, sender=Docx)
|
||
|
def create_player(sender, instance, created, **kwargs):
|
||
|
if created:
|
||
|
process_file.delay(file=instance)
|
||
|
return
|