Subversion Repositories SmartDukaan

Rev

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

Rev 19104 Rev 19112
Line 251... Line 251...
251
            for gcm_id, details in gcmRegIdMap.items():
251
            for gcm_id, details in gcmRegIdMap.items():
252
                android_id = None
252
                android_id = None
253
                if details.has_key('android_id'):
253
                if details.has_key('android_id'):
254
                    android_id = details['android_id']
254
                    android_id = details['android_id']
255
                pushNotificationObj = __PushNotification(campaignId, userId, None, 'pending', \
255
                pushNotificationObj = __PushNotification(campaignId, userId, None, 'pending', \
256
                                    None, None, android_id, "php", None, None, None, None, gcm_id, to_java_date(datetime.now()),None)
256
                                    None, None, android_id, "php", None, None, None, None, gcm_id, to_java_date(datetime.now()),0)
257
                get_mongo_connection(host=mongoHost).User.pushnotificationsnew.insert(pushNotificationObj.__dict__)
257
                get_mongo_connection(host=mongoHost).User.pushnotificationsnew.insert(pushNotificationObj.__dict__)
258
        
258
        
259
def populatePendingNotificationEntriesToBeSent():
259
def populatePendingNotificationEntriesToBeSent():
260
    global pendingNotificationEntryMap
260
    global pendingNotificationEntryMap
261
    pendingNotificationEntries = list(get_mongo_connection(host=mongoHost).User.pushnotificationsnew.find({'type':'pending'}))
261
    pendingNotificationEntries = list(get_mongo_connection(host=mongoHost).User.pushnotificationsnew.find({'type':'pending'}))