jira-28 notification

This commit is contained in:
jain
2023-07-26 16:38:36 +05:30
parent bca0d8d49b
commit 2b6e943d8c
8 changed files with 103 additions and 32 deletions

View File

@ -18,6 +18,10 @@ from junior.models import Junior, JuniorPoints
from .models import JuniorTask
# Import app from celery
from zod_bank.celery import app
# notification's constant
from notifications.constants import REFERRAL_POINTS
# send notification function
from notifications.utils import send_notification
# Define upload image on
# ali baba cloud
# firstly save image
@ -85,6 +89,8 @@ def update_referral_points(referral_code, referral_code_used):
junior_query.total_points = junior_query.total_points + NUMBER['five']
junior_query.referral_points = junior_query.referral_points + NUMBER['five']
junior_query.save()
send_notification.delay(REFERRAL_POINTS, None, junior_queryset.auth.id, {})
@app.task