Commit 5de6563a authored by BaiJiangJie's avatar BaiJiangJie

[Update] 解决连接windows资产出现幽灵会话的问题

parent 6d96b5db
......@@ -39,6 +39,9 @@ class SessionViewSet(BulkModelViewSet):
terminal = get_object_or_404(Terminal, id=terminal_id)
queryset = queryset.filter(terminal=terminal)
return queryset
# 解决guacamole更新session时并发导致幽灵会话的问题
if self.request.method in ('PATCH', ):
queryset = queryset.select_for_update()
return queryset
def perform_create(self, serializer):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment