Mercurial > libervia-backend
comparison src/core/sat_main.py @ 484:23cbdf0a0777
core: presence status + last resource refactored and kept in entitiesCache in memory.py, profile cache is purged on disconnection
author | Goffi <goffi@goffi.org> |
---|---|
date | Wed, 15 Aug 2012 15:50:46 +0200 |
parents | 2a072735e459 |
children | f36c705a5310 |
comparison
equal
deleted
inserted
replaced
482:e0d1eed4a46b | 484:23cbdf0a0777 |
---|---|
254 | 254 |
255 current.startService() | 255 current.startService() |
256 | 256 |
257 return current.getConnectionDeferred() | 257 return current.getConnectionDeferred() |
258 | 258 |
259 self.memory.startProfileSession(profile) | |
259 return self.memory.loadIndividualParams(profile).addCallback(afterMemoryInit) | 260 return self.memory.loadIndividualParams(profile).addCallback(afterMemoryInit) |
260 | 261 |
261 def disconnect(self, profile_key): | 262 def disconnect(self, profile_key): |
262 """disconnect from jabber server""" | 263 """disconnect from jabber server""" |
263 if (not self.isConnected(profile_key)): | 264 if (not self.isConnected(profile_key)): |
288 the garbage collector can then free the memory""" | 289 the garbage collector can then free the memory""" |
289 try: | 290 try: |
290 del self.profiles[profile] | 291 del self.profiles[profile] |
291 except KeyError: | 292 except KeyError: |
292 error(_("Trying to remove reference to a client not referenced")) | 293 error(_("Trying to remove reference to a client not referenced")) |
293 self.memory.purgeProfile(profile) | 294 self.memory.purgeProfileSession(profile) |
294 | 295 |
295 def startService(self): | 296 def startService(self): |
296 info("Salut à toi ô mon frère !") | 297 info("Salut à toi ô mon frère !") |
297 #TODO: manage autoconnect | 298 #TODO: manage autoconnect |
298 #self.connect() | 299 #self.connect() |