Exemplo n.º 1
0
 def _latest(self, a):
   lm=a[0]
   l=metaVrr(lm)
   for m in a[1:]:
     v=metaVrr(m)
     if strverscmp(v, l)>0: lm=m; l=v
   return lm
Exemplo n.º 2
0
 def _latest(self, a):
     lm = a[0]
     l = metaVrr(lm)
     for m in a[1:]:
         v = metaVrr(m)
         if strverscmp(v, l) > 0:
             lm = m
             l = v
     return lm
Exemplo n.º 3
0
 def dropOld(self):
   """
   drop index for all indexed kutub that got updated
   this is useful if followed by indexNew
   
   no need you need to call indexingStart() indexingEnd() around this
   """
   self.indexingStart()
   m=self.th.getMeta()
   for n in self.th.getKitabList():
     vr=self.getIndexedVersion(n)
     if vr and strverscmp(vr,metaVrr(m.getLatestKitab(n)))>0: self.dropKitabIndex(n)
   self.indexingEnd()
Exemplo n.º 4
0
 def dropOld(self):
     """
 drop index for all indexed kutub that got updated
 this is useful if followed by indexNew
 
 no need you need to call indexingStart() indexingEnd() around this
 """
     self.indexingStart()
     m = self.th.getMeta()
     for n in self.th.getKitabList():
         vr = self.getIndexedVersion(n)
         if vr and strverscmp(vr, metaVrr(m.getLatestKitab(n))) > 0:
             self.dropKitabIndex(n)
     self.indexingEnd()