Ejemplo n.º 1
0
 def get_latest_version(self, key: str = None):
     mongo_events = MongoEvent.get_by_key(self.server_id, key, 0, 1,
                                          "-version")
     if not mongo_events:
         return 0
     return mongo_events[0].version
Ejemplo n.º 2
0
 def get_latest_version(self, key: str, namespace: str = None):
     mongo_events = MongoEvent.get_by_key(key, 0, 1, "-version")
     if not mongo_events:
         return 0
     return mongo_events[0].version