changed notification method, added celery task to notify expiring task

This commit is contained in:
abutalib-kiwi
2023-08-24 12:10:18 +05:30
parent 5b9f7b1828
commit f541608656
12 changed files with 153 additions and 71 deletions

View File

@ -21,7 +21,7 @@ from zod_bank.celery import app
# notification's constant
from notifications.constants import REFERRAL_POINTS
# send notification function
from notifications.utils import send_notification, send_notification_to_junior
from notifications.utils import send_notification
# Define upload image on
@ -117,7 +117,7 @@ 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_to_junior.delay(REFERRAL_POINTS, None, junior_queryset.auth.id, {})
send_notification.delay(REFERRAL_POINTS, None, None, junior_queryset.auth.id, {})