def last_backup_not_newer_than(self, datetime): return Backup.query(ancestor=self.key) \ .filter(Backup.deleted == None) \ .filter(Backup.created <= datetime) \ .order(-Backup.created).get()
def __last_backup_async(self): return Backup.query(ancestor=self.key) \ .filter(Backup.deleted == None) \ .order(-Backup.created) \ .get_async()