Browse Source

perf: 修改 applet 是否支持并发,也依赖于 host

pull/10705/head
ibuler 1 year ago committed by Jiangjie.Bai
parent
commit
459176550d
  1. 3
      apps/terminal/models/applet/applet.py

3
apps/terminal/models/applet/applet.py

@ -194,7 +194,8 @@ class Applet(JMSBaseModel):
host = self.select_host(user)
if not host:
return None
can_concurrent = self.can_concurrent or self.type == 'web'
host_concurrent = str(host.deploy_options.get('RDS_fSingleSessionPerUser', 0)) == '1'
can_concurrent = (self.can_concurrent or self.type == 'web') and host_concurrent
accounts = host.accounts.all().filter(is_active=True, privileged=False)
private_account = accounts.filter(username='js_{}'.format(user.username)).first()

Loading…
Cancel
Save