Exemple #1
0
 def save(self, session):
     obj = self.get_session(session.sid) or Session(sid=session.sid)
     try:
         obj.set_data(dict(session))
         obj.save()
         db.commit()
     except pickle.PickleError:
         pass
Exemple #2
0
 def list(self):
     return Session.select('sid').fetch(-1)
Exemple #3
0
 def list(self):
     return Session.select('sid').fetch(-1)
Exemple #4
0
 def get_session(self, sid):
     obj = Session.all().filter('sid ==', sid).fetch(1)
     return obj[0] if obj else None
Exemple #5
0
 def get_session(self, sid):
     obj = Session.all().filter('sid ==', sid).fetch(1)
     return obj[0] if obj else None