Subversion Repositories SmartDukaan

Rev

Rev 19125 | Rev 19133 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 19125 Rev 19126
Line 264... Line 264...
264
            for gcm_id, details in gcmRegIdMap.items():
264
            for gcm_id, details in gcmRegIdMap.items():
265
                android_id = None
265
                android_id = None
266
                logging.debug("User Id:- "+str(userId)+" ..User Details:- "+str(details))
266
                logging.debug("User Id:- "+str(userId)+" ..User Details:- "+str(details))
267
                if details.has_key('android_id'):
267
                if details.has_key('android_id'):
268
                    android_id = details['android_id']
268
                    android_id = details['android_id']
269
                pushNotificationObj = __PushNotification(str(campaignId), userId, None, 'pending', \
269
                pushNotificationObj = __PushNotification(str(campaignId), long(userId), None, 'pending', \
270
                                    None, None, android_id, "php", None, None, None, None, gcm_id, to_java_date(datetime.now()),0)
270
                                    None, None, android_id, "php", None, None, None, None, gcm_id, to_java_date(datetime.now()),0)
271
                get_mongo_connection(host=mongoHost).User.pushnotifications.insert(pushNotificationObj.__dict__)
271
                get_mongo_connection(host=mongoHost).User.pushnotifications.insert(pushNotificationObj.__dict__)
272
        
272
        
273
def populatePendingNotificationEntriesToBeSent():
273
def populatePendingNotificationEntriesToBeSent():
274
    global pendingNotificationEntryMap
274
    global pendingNotificationEntryMap