ATS/recruitment/hooks.py
2026-01-29 14:19:03 +03:00

14 lines
414 B
Python

from .models import Application
from time import sleep
def callback_ai_parsing(task):
if task.success:
try:
pk = task.args[0]
c = Application.objects.get(pk=pk)
if c.retry and not c.is_resume_parsed:
sleep(30)
c.retry -= 1
c.save()
except Exception as e:
print(e)