mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
WebHost: don't bother queuing empty commands
This commit is contained in:
@@ -166,8 +166,9 @@ def host_room(room: UUID):
|
|||||||
if request.method == "POST":
|
if request.method == "POST":
|
||||||
if room.owner == session["_id"]:
|
if room.owner == session["_id"]:
|
||||||
cmd = request.form["cmd"]
|
cmd = request.form["cmd"]
|
||||||
Command(room=room, commandtext=cmd)
|
if cmd:
|
||||||
commit()
|
Command(room=room, commandtext=cmd)
|
||||||
|
commit()
|
||||||
|
|
||||||
with db_session:
|
with db_session:
|
||||||
room.last_activity = datetime.utcnow() # will trigger a spinup, if it's not already running
|
room.last_activity = datetime.utcnow() # will trigger a spinup, if it's not already running
|
||||||
|
Reference in New Issue
Block a user