예제 #1
0
 def del_record_timeout(self, opt, view, domain, rtype):
     self.lock.acquire()
     oldobj = self.__del_item(self.type_err_record, opt, view, domain, rtype)
     if oldobj and not self.__del_or_not4del(oldobj['sent'], oldobj['regain']):
         oldobj['sent'] = 0
         oldobj['regain'] = 1
         oldobj['settime'] = get_time()
         self.desc[self.type_err_record].append(oldobj)
     self.__travel()
     self.lock.release()
예제 #2
0
 def add_view_timeout(self, opt, view, mask):
     self.lock.acquire()
     oldobj = self.__del_item(self.type_err_view, opt, view, mask)
     if oldobj and not self.__del_or_not4add(oldobj['sent'], oldobj['regain']):
         self.desc[self.type_err_view].append(oldobj)
     else:
         obj = {'opt':opt, 'view':view, 'mask':mask, 'settime':get_time(), 'sent':0, 'regain':0}
         self.desc[self.type_err_view].append(obj)
     self.__travel()
     self.lock.release()
예제 #3
0
 def del_db_error(self, desc):
     self.lock.acquire()
     if self.db_desc.has_key(desc):
         oldobj = self.__del_item(self.type_err_db, desc)
         if oldobj and not self.__del_or_not4del(oldobj['sent'], oldobj['regain']):
             oldobj['sent'] = 0
             oldobj['regain'] = 1
             oldobj['settime'] = get_time()
             self.desc[self.type_err_db].append(oldobj)
         self.__travel()
     self.lock.release()
예제 #4
0
 def add_db_error(self, desc):
     self.lock.acquire()
     if self.db_desc.has_key(desc):
         oldobj = self.__del_item(self.type_err_db, desc)
         if oldobj and not self.__del_or_not4add(oldobj['sent'], oldobj['regain']):
             self.desc[self.type_err_db].append(oldobj)
         else:
             obj = {'desc':desc, 'settime':get_time(), 'sent':0, 'regain':0}
             self.desc[self.type_err_db].append(obj)
         self.__travel()
     self.lock.release()
예제 #5
0
 def add_record_timeout(self, opt, view, domain, rtype):
     self.lock.acquire()
     oldobj = self.__del_item(self.type_err_record, opt, view, domain, rtype)
     if oldobj and not self.__del_or_not4add(oldobj['sent'], oldobj['regain']):
         self.desc[self.type_err_record].append(oldobj)
     else:
         obj = {'opt':opt, 'view':view, 'domain':domain, 'type':rtype, 'settime':get_time(),
                 'sent':0, 'regain':0}
         self.desc[self.type_err_record].append(obj)
     self.__travel()
     self.lock.release()
예제 #6
0
 def del_view_timeout(self, opt, view, mask):
     self.lock.acquire()
     oldobj = self.__del_item(self.type_err_view, opt, view, mask)
     if oldobj and not self.__del_or_not4del(oldobj['sent'],
                                             oldobj['regain']):
         oldobj['sent'] = 0
         oldobj['regain'] = 1
         oldobj['settime'] = get_time()
         self.desc[self.type_err_view].append(oldobj)
     self.__travel()
     self.lock.release()
예제 #7
0
 def del_db_error(self, desc):
     self.lock.acquire()
     if self.db_desc.has_key(desc):
         oldobj = self.__del_item(self.type_err_db, desc)
         if oldobj and not self.__del_or_not4del(oldobj['sent'],
                                                 oldobj['regain']):
             oldobj['sent'] = 0
             oldobj['regain'] = 1
             oldobj['settime'] = get_time()
             self.desc[self.type_err_db].append(oldobj)
         self.__travel()
     self.lock.release()
예제 #8
0
 def add_db_error(self, desc):
     self.lock.acquire()
     if self.db_desc.has_key(desc):
         oldobj = self.__del_item(self.type_err_db, desc)
         if oldobj and not self.__del_or_not4add(oldobj['sent'],
                                                 oldobj['regain']):
             self.desc[self.type_err_db].append(oldobj)
         else:
             obj = {
                 'desc': desc,
                 'settime': get_time(),
                 'sent': 0,
                 'regain': 0
             }
             self.desc[self.type_err_db].append(obj)
         self.__travel()
     self.lock.release()
예제 #9
0
 def add_view_timeout(self, opt, view, mask):
     self.lock.acquire()
     oldobj = self.__del_item(self.type_err_view, opt, view, mask)
     if oldobj and not self.__del_or_not4add(oldobj['sent'],
                                             oldobj['regain']):
         self.desc[self.type_err_view].append(oldobj)
     else:
         obj = {
             'opt': opt,
             'view': view,
             'mask': mask,
             'settime': get_time(),
             'sent': 0,
             'regain': 0
         }
         self.desc[self.type_err_view].append(obj)
     self.__travel()
     self.lock.release()
예제 #10
0
 def add_record_timeout(self, opt, view, domain, rtype):
     self.lock.acquire()
     oldobj = self.__del_item(self.type_err_record, opt, view, domain,
                              rtype)
     if oldobj and not self.__del_or_not4add(oldobj['sent'],
                                             oldobj['regain']):
         self.desc[self.type_err_record].append(oldobj)
     else:
         obj = {
             'opt': opt,
             'view': view,
             'domain': domain,
             'type': rtype,
             'settime': get_time(),
             'sent': 0,
             'regain': 0
         }
         self.desc[self.type_err_record].append(obj)
     self.__travel()
     self.lock.release()