]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - apt_dht_Khashmir/actions.py
Move the key expiring to the checkpoint function.
[quix0rs-apt-p2p.git] / apt_dht_Khashmir / actions.py
index 7822579733b55a9ec1e0234767dcf1d422daf74b..05349d4147efe1df81e5c1ccfe35c95c599008a4 100644 (file)
@@ -236,20 +236,3 @@ class StoreValue(ActionBase):
         self.nodes = nodes
         self.nodes.sort(self.sort)
         self.schedule()
-
-
-class KeyExpirer:
-    def __init__(self, store, config):
-        self.store = store
-        self.config = config
-        self.next_expire = reactor.callLater(self.config['KEINITIAL_DELAY'], self.doExpire)
-    
-    def doExpire(self):
-        self.store.expireValues(self.config['KE_AGE'])
-        self.next_expire = reactor.callLater(self.config['KE_DELAY'], self.doExpire)
-        
-    def shutdown(self):
-        try:
-            self.next_expire.cancel()
-        except:
-            pass