Subversion Repositories SmartDukaan

Rev

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

Rev 16846 Rev 16896
Line 4... Line 4...
4
from dtr.utils.utils import AFFILIATE_OFFER_API, AFFILIATE_OFFER_DESC_API, fetchResponseUsingProxy
4
from dtr.utils.utils import AFFILIATE_OFFER_API, AFFILIATE_OFFER_DESC_API, fetchResponseUsingProxy
5
import json
5
import json
6
import math
6
import math
7
from dtr.utils.MailSender import Email
7
from dtr.utils.MailSender import Email
8
import traceback
8
import traceback
-
 
9
from dtr.storage import Mongo
9
 
10
 
10
AFFILIATE_ID = 1
11
AFFILIATE_ID = 1
11
DEVICE_ID = "SpiceRetail"
12
DEVICE_ID = "SpiceRetail"
12
RETAILER_CODE = 123
13
RETAILER_CODE = 123
13
ACTIVE_OFFERS = []
14
ACTIVE_OFFERS = []
Line 224... Line 225...
224
    try:
225
    try:
225
        dumpOffers()
226
        dumpOffers()
226
        print 'GOT_RESPONSE', GOT_RESPONSE
227
        print 'GOT_RESPONSE', GOT_RESPONSE
227
        if GOT_RESPONSE:
228
        if GOT_RESPONSE:
228
            markOfferAsInactive()
229
            markOfferAsInactive()
-
 
230
            Mongo.populateAppOffers(AFFILIATE_ID)
229
    finally:
231
    finally:
230
        session.close()
232
        session.close()
231
 
233
 
232
if __name__ == '__main__':
234
if __name__ == '__main__':
233
    main()
235
    main()
234
236