Subversion Repositories SmartDukaan

Rev

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

Rev 8111 Rev 8119
Line 117... Line 117...
117
            print "Number of failed attempts is more than 10. Exiting"
117
            print "Number of failed attempts is more than 10. Exiting"
118
            sys.exit()
118
            sys.exit()
119
            
119
            
120
        for emailId in self.exceptionCount.keys() :
120
        for emailId in self.exceptionCount.keys() :
121
            if self.exceptionCount[emailId] > 10:
121
            if self.exceptionCount[emailId] > 10:
122
                print "Number of exceptions for email id : " + emailId + " is : " + self.exceptionCount[emailId] + ". Exiting"
122
                print "Number of exceptions for email id : " + str(emailId) + " is : " + str(self.exceptionCount[emailId]) + ". Exiting"
123
                sys.exit()
123
                sys.exit()
124
                
124
                
125
        print "Despatch stared at ", time.time()
125
        print "Despatch stared at ", time.time()
126
        helper_client = HelperClient().get_client()
126
        helper_client = HelperClient().get_client()
127
        
127
        
Line 133... Line 133...
133
                send_result = "error"
133
                send_result = "error"
134
                send_result = self.sendMail(email)
134
                send_result = self.sendMail(email)
135
            except Exception as e:
135
            except Exception as e:
136
                print sys.exc_info()[0]
136
                print sys.exc_info()[0]
137
                print e
137
                print e
138
                print 'Error occurred sending email with id - ' + email.id
138
                print 'Error occurred sending email with id - ' + str(email.id)
139
                if self.exceptionCount.has_key(email.id) :
139
                if self.exceptionCount.has_key(email.id) :
140
                    self.exceptionCount[email.id] = self.exceptionCount[email.id] + 1
140
                    self.exceptionCount[email.id] = self.exceptionCount[email.id] + 1
141
                else :
141
                else :
142
                    self.exceptionCount[email.id] = 1
142
                    self.exceptionCount[email.id] = 1
143
                continue
143
                continue