diff src/server/session_iface.py @ 1090:9c41b7e91172

server: set jid and started time in session on log-in: session make the difference between local libervia session ("started"), and backend session ("backend_started")
author Goffi <goffi@goffi.org>
date Fri, 01 Jun 2018 12:55:25 +0200
parents c2037b44f84e
children eda7a1c6532a
line wrap: on
line diff
--- a/src/server/session_iface.py	Fri Jun 01 12:52:14 2018 +0200
+++ b/src/server/session_iface.py	Fri Jun 01 12:55:25 2018 +0200
@@ -21,6 +21,7 @@
 from libervia.server.constants import Const as C
 import os.path
 import shortuuid
+import time
 
 FLAGS_KEY = '_flags'
 
@@ -37,6 +38,9 @@
     def __init__(self, session):
         self.profile = None
         self.jid = None
+        self.started = time.time()
+        # time when the backend session was started
+        self.backend_started = None
         self.uuid = unicode(shortuuid.uuid())
         self.identities = data_objects.Identities()
         self.csrf_token = unicode(shortuuid.uuid())