From 9f5e40283ad5fb3c26bfacef424c15364a5cad9f Mon Sep 17 00:00:00 2001 From: Fabian Dill Date: Mon, 18 Jul 2022 21:10:29 +0200 Subject: [PATCH] WebHost: reduce server uptime (#794) * WebHost: attempt to improve wording of server resume * WebHost: reduce default room timeout to 2 hours Co-authored-by: black-sliver <59490463+black-sliver@users.noreply.github.com> --- WebHostLib/models.py | 2 +- WebHostLib/templates/hostRoom.html | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/WebHostLib/models.py b/WebHostLib/models.py index 3d6de681..70f0318f 100644 --- a/WebHostLib/models.py +++ b/WebHostLib/models.py @@ -27,7 +27,7 @@ class Room(db.Entity): seed = Required('Seed', index=True) multisave = Optional(buffer, lazy=True) show_spoiler = Required(int, default=0) # 0 -> never, 1 -> after completion, -> 2 always - timeout = Required(int, default=lambda: 6 * 60 * 60) # seconds since last activity to shutdown + timeout = Required(int, default=lambda: 2 * 60 * 60) # seconds since last activity to shutdown tracker = Optional(UUID, index=True) last_port = Optional(int, default=lambda: 0) diff --git a/WebHostLib/templates/hostRoom.html b/WebHostLib/templates/hostRoom.html index b5ec01f2..15429e7f 100644 --- a/WebHostLib/templates/hostRoom.html +++ b/WebHostLib/templates/hostRoom.html @@ -16,9 +16,9 @@ This room has a Multiworld Tracker enabled.
{% endif %} - This room will be closed after {{ room.timeout//60//60 }} hours of inactivity. Should you wish to continue - later, - you can simply refresh this page and the server will be started again.
+ The server for this room will be paused after {{ room.timeout//60//60 }} hours of inactivity. + Should you wish to continue later, + anyone can simply refresh this page and the server will resume.
{% if room.last_port %} You can connect to this room by using