| Line 33... |
Line 33... |
| 33 |
eligibleSmsNotficationCampaigns = list(get_mongo_connection(host=mongoHost).User.notificationcampaigns.find({'smsprocessed':1,'created':{'$lte':to_java_date(timeCondition)}}))
|
33 |
eligibleSmsNotficationCampaigns = list(get_mongo_connection(host=mongoHost).User.notificationcampaigns.find({'smsprocessed':1,'created':{'$lte':to_java_date(timeCondition)}}))
|
| 34 |
for notificationCampaign in eligibleSmsNotficationCampaigns:
|
34 |
for notificationCampaign in eligibleSmsNotficationCampaigns:
|
| 35 |
logging.debug('Notification_Campign_Id:- '+str(notificationCampaign.get('_id')))
|
35 |
logging.debug('Notification_Campign_Id:- '+str(notificationCampaign.get('_id')))
|
| 36 |
|
36 |
|
| 37 |
jsonSentList = list(get_mongo_connection(host=mongoHost).User.pushnotificationsnew.find({'notification_campaign_id':notificationCampaign.get('_id'),'smstype':'SMS_SENT_OPERATOR'}))
|
37 |
jsonSentList = list(get_mongo_connection(host=mongoHost).User.pushnotificationsnew.find({'notification_campaign_id':notificationCampaign.get('_id'),'smstype':'SMS_SENT_OPERATOR'}))
|
| - |
|
38 |
logging.debug('Total Promotional Entries to Processed.....'+str(len(jsonSentList))+' Current Time:- '+str(datetime.now()))
|
| 38 |
|
39 |
|
| 39 |
for smsResponse in jsonSentList:
|
40 |
for smsResponse in jsonSentList:
|
| 40 |
del_det_params = {'user' : 'srlsaholicP', 'password' : 'srp8oct' , 'apimsgid' : smsResponse.get('sms_id')}
|
41 |
del_det_params = {'user' : 'srlsaholicP', 'password' : 'srp8oct' , 'apimsgid' : smsResponse.get('sms_id')}
|
| 41 |
encoded_del_det_params = urllib.urlencode(del_det_params)
|
42 |
encoded_del_det_params = urllib.urlencode(del_det_params)
|
| 42 |
del_det_url = 'http://103.15.179.45:8085/MessagingGateway/http/querymsg?' + encoded_del_det_params
|
43 |
del_det_url = 'http://103.15.179.45:8085/MessagingGateway/http/querymsg?' + encoded_del_det_params
|
| Line 67... |
Line 68... |
| 67 |
logging.debug('Error while getting response for message id:- '+ str(smsResponse.get("sms_id")))
|
68 |
logging.debug('Error while getting response for message id:- '+ str(smsResponse.get("sms_id")))
|
| 68 |
traceback.print_exc()
|
69 |
traceback.print_exc()
|
| 69 |
continue
|
70 |
continue
|
| 70 |
|
71 |
|
| 71 |
jsonSentList = list(get_mongo_connection(host=mongoHost).User.pushnotificationsnew.find({'notification_campaign_id':notificationCampaign.get('_id'),'smstype':'SMS_INPROCESS'}))
|
72 |
jsonSentList = list(get_mongo_connection(host=mongoHost).User.pushnotificationsnew.find({'notification_campaign_id':notificationCampaign.get('_id'),'smstype':'SMS_INPROCESS'}))
|
| - |
|
73 |
logging.debug('Total Transactional Entries to Processed.....'+str(len(jsonSentList))+' Current Time:- '+str(datetime.now()))
|
| 72 |
|
74 |
|
| 73 |
for smsResponse in jsonSentList:
|
75 |
for smsResponse in jsonSentList:
|
| 74 |
del_det_params = {'uname' : 'srlsaholic', 'passwd' : 'sr18mar' , 'messageid' : str(smsResponse.get('sms_id'))}
|
76 |
del_det_params = {'uname' : 'srlsaholic', 'passwd' : 'sr18mar' , 'messageid' : str(smsResponse.get('sms_id'))}
|
| 75 |
encoded_del_det_params = urllib.urlencode(del_det_params)
|
77 |
encoded_del_det_params = urllib.urlencode(del_det_params)
|
| 76 |
del_det_url = 'http://103.15.179.45:8085/SMSGateway/getApiReport?' + encoded_del_det_params
|
78 |
del_det_url = 'http://103.15.179.45:8085/SMSGateway/getApiReport?' + encoded_del_det_params
|