Subversion Repositories SmartDukaan

Rev

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

Rev 17660 Rev 17661
Line 17... Line 17...
17
import re
17
import re
18
import traceback
18
import traceback
19
import urlparse
19
import urlparse
20
import xlrd
20
import xlrd
21
 
21
 
22
logging.basicConfig(filename='/var/log/uwsgi/order.log',level=logging.INFO)
22
logging.basicConfig(filename='/var/log/uwsgi/order.log',level=logging.WARNING)
23
 
23
 
24
 
24
 
25
order_fliters = {
25
order_fliters = {
26
                 "monitor":{
26
                 "monitor":{
27
                    "trackingurlmissing":  {
27
                    "trackingurlmissing":  {
Line 118... Line 118...
118
class Track():
118
class Track():
119
    def on_post(self, req, resp, userId):
119
    def on_post(self, req, resp, userId):
120
        try:
120
        try:
121
            string1 = req.stream.read()
121
            string1 = req.stream.read()
122
            req_obj = urlparse.parse_qs(string1)
122
            req_obj = urlparse.parse_qs(string1)
123
            logging.info(string1)
123
            logging.warn(string1)
124
        except ValueError:
124
        except ValueError:
125
            raise falcon.HTTPError(falcon.HTTP_400,
125
            raise falcon.HTTPError(falcon.HTTP_400,
126
                'Malformed JSON',
126
                'Malformed JSON',
127
                'Could not decode the request body. The '
127
                'Could not decode the request body. The '
128
                'JSON was incorrect.')
128
                'JSON was incorrect.')