Commits

Marcin Lulek  committed 18e8378

remove history references

  • Participants
  • Parent commits 909ac03

Comments (0)

Files changed (2)

File gevent_cometd/app_views.py

                             #remove user key from channel connections
                             if user_name in channel_inst.connections and not channel_inst.connections[user_name]:
                                 channel_inst.connections.pop(user_name, None)
-                    # now make pass over users and remove user objects that weren't active for at least 7 days
+                    # now make pass over users and remove user objects that weren't active for at least 1 day
                     for key, user_inst in gevent_cometd.users.items():
                         curr_time = datetime.datetime.utcnow()
                         delta = curr_time - user_inst.last_active
-                        if delta.days >= 7:
+                        if delta.days >= 1:
                             gevent_cometd.users.pop(key)
                 except Exception, e:
                     raise

File gevent_cometd/user.py

         self.connections = [] #holds ids of connections
         self.channels = [] #holds ids of channels
         self.last_active = datetime.datetime.utcnow()
-        self.history = []
 
     #TODO currently broken
     def notify_presence(self, user, status):
     def add_message(self, message):
         # mark active
         self.last_active = datetime.datetime.utcnow()
-        if len(self.history) > 20:
-            self.history.pop(0)
         for conn_id in self.connections:
             connection = Connection.by_id(conn_id)
             if connection: