1
0

Apply suggestions from code review

Co-authored-by: Eric Eastwood <erice@element.io>
This commit is contained in:
Mathieu Velten
2023-06-09 14:59:14 +02:00
committed by GitHub
parent a90a189ee3
commit dfdca3f9e0
2 changed files with 4 additions and 4 deletions

View File

@@ -184,8 +184,8 @@ class PaginationHandler:
self._delete_by_id[delete_id].status = status
self._delete_by_room.setdefault(room_id, []).append(delete_id)
# restore a shutdown from the DB
# also take care of purging if needed
# If the database says we were last in the middle of shutting down the room,
# let's continue the shutdown process.
shutdown_response = None
if status == DeleteStatus.STATUS_SHUTTING_DOWN:
shutdown_params = json.loads(r["shutdown_params"])
@@ -683,7 +683,7 @@ class PaginationHandler:
shutdown_params: parameters for the shutdown, cf `RoomShutdownHandler.ShutdownRoomParams`
shutdown_response: current status of the shutdown, if it was interrupted
Saves a `RoomShutdownHandler.ShutdownRoomResponse` in `DeleteStatus` and in DB
Keeps track of the `DeleteStatus` (and `ShutdownRoomResponse`) in `self._delete_by_id` and persisted in DB
"""
self._purges_in_progress_by_room.add(room_id)

View File

@@ -1730,7 +1730,7 @@ class ShutdownRoomParams(TypedDict):
If set to `true`, purge the given room from the database.
force_purge:
If set to `true`, the room will be purged from database
also if it fails to remove some users from room.
even if there are still users joined to the room.
"""
requester_user_id: str