Commit 6d67ec79 by dima

Update goip/tasks.py

parent 5312aa61
Showing with 1 additions and 3 deletions
......@@ -2,7 +2,6 @@ from goip.helpers import get_goips, reset_sms_count, generate_sms
from .models import SmsGroup, SmsHistory, GoipNames
from sms_service.celery import app
from .helpers import GOIP
import uuid
DELAY = 60
......@@ -16,8 +15,7 @@ class UpdateSMStatusError(Exception):
def list_send_sms(group_id, numbers, text):
group = SmsGroup.objects.get(uuid=group_id)
for number, sms_text in generate_sms(numbers, text):
sms_id = str(uuid.uuid4())
# sms_id = GOIP.send_sms(sms_text, number)
sms_id = GOIP.send_sms(sms_text, number)
group.sms.create(sms_id=sms_id, number=number, text=sms_text)
update_sms_status.apply_async((sms_id,), countdown=DELAY)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment