server/session.py
changeset 9493 852f5ac90cd9
parent 9482 5b97e69f9c29
child 9495 0ae4e6d7ce2f
equal deleted inserted replaced
9491:e82370a30018 9493:852f5ac90cd9
   448         if cnxid is not None:
   448         if cnxid is not None:
   449             assert session_handled # only session profive explicite cnxid
   449             assert session_handled # only session profive explicite cnxid
   450         #: connection unique id
   450         #: connection unique id
   451         self._open = None
   451         self._open = None
   452         if cnxid is None:
   452         if cnxid is None:
   453             cnxid = '%s-%s' % (session.id, uuid4().hex)
   453             cnxid = '%s-%s' % (session.sessionid, uuid4().hex)
   454         self.connectionid = cnxid
   454         self.connectionid = cnxid
   455         self.sessionid = session.id
   455         self.sessionid = session.sessionid
   456         #: self._session_handled
   456         #: self._session_handled
   457         #: are the life cycle of this Connection automatically controlled by the
   457         #: are the life cycle of this Connection automatically controlled by the
   458         #: Session This is the old backward compatibility mode
   458         #: Session This is the old backward compatibility mode
   459         self._session_handled = session_handled
   459         self._session_handled = session_handled
   460         #: reentrance handling
   460         #: reentrance handling
  1363         self._closed = False
  1363         self._closed = False
  1364         self._lock = threading.RLock()
  1364         self._lock = threading.RLock()
  1365 
  1365 
  1366     def __unicode__(self):
  1366     def __unicode__(self):
  1367         return '<session %s (%s 0x%x)>' % (
  1367         return '<session %s (%s 0x%x)>' % (
  1368             unicode(self.user.login), self.id, id(self))
  1368             unicode(self.user.login), self.sessionid, id(self))
  1369     @property
  1369     @property
  1370     def timestamp(self):
  1370     def timestamp(self):
  1371         return float(self._timestamp)
  1371         return float(self._timestamp)
  1372 
  1372 
  1373     @property
  1373     @property