mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-16 06:22:59 +00:00
remove last_activity from server
and put it on individual spawners
This commit is contained in:
@@ -65,16 +65,13 @@ class Server(Base):
|
||||
"""
|
||||
__tablename__ = 'servers'
|
||||
id = Column(Integer, primary_key=True)
|
||||
|
||||
|
||||
proto = Column(Unicode(15), default='http')
|
||||
ip = Column(Unicode(255), default='') # could also be a DNS name
|
||||
port = Column(Integer, default=random_port)
|
||||
base_url = Column(Unicode(255), default='/')
|
||||
cookie_name = Column(Unicode(255), default='cookie')
|
||||
|
||||
# added to handle multi-server feature
|
||||
last_activity = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
def __repr__(self):
|
||||
return "<Server(%s:%s)>" % (self.ip, self.port)
|
||||
|
||||
@@ -186,6 +183,8 @@ class Spawner(Base):
|
||||
state = Column(JSONDict)
|
||||
name = Column(Unicode(512))
|
||||
|
||||
last_activity = Column(DateTime, default=datetime.utcnow)
|
||||
|
||||
|
||||
class Service(Base):
|
||||
"""A service run with JupyterHub
|
||||
|
Reference in New Issue
Block a user