Пример #1
0
 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()
Пример #2
0
 def post(self):
     channel_id = self.request.get('from')
     q = OnlineUser.all().filter('channel_id =', channel_id)
     users = q.fetch(1000)
     db.delete(users)
Пример #3
0
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)