def post(self): channel_id = self.request.get('from') q = OnlineUser.all().filter('channel_id =', channel_id) user = q.fetch(1)[0] user.opened_socket = True user.put()
def post(self): channel_id = self.request.get('from') q = OnlineUser.all().filter('channel_id =', channel_id) users = q.fetch(1000) db.delete(users)
def handle_disconnection(channel_id): # Find all their subscriptions and delete them. q = OnlineUser.all().filter('channel_id =', channel_id) users = q.fetch(1000) db.delete(users)