perf: 优化关闭弹窗方式及数据库连接名称优化 (#9508)

pull/9510/head
jiangweidong 2023-02-10 18:20:47 +08:00 committed by GitHub
parent aa483a3c6d
commit 564a87304c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 2 deletions

View File

@ -27,7 +27,7 @@ class AppletApplication(BaseApplication):
self.host = self.asset.address
self.port = self.asset.get_protocol_port(self.protocol)
self.db = self.asset.spec_info.db_name
self.name = '%s-%s' % (self.host, self.db)
self.name = '%s-%s-%s' % (self.host, self.db, int(time.time()))
self.pid = None
self.app = None
@ -267,7 +267,7 @@ class AppletApplication(BaseApplication):
raise ValueError('This protocol is not supported: %s' % self.protocol)
commands = action()
# 关闭掉桌面许可弹框
commands.insert(0, {'type': 'key', 'commands': (c.ENTER,)})
commands.insert(0, {'type': 'key', 'commands': (c.ESC,)})
# 登录
commands.extend([
{

View File

@ -4,4 +4,5 @@ LEFT = '{LEFT}'
DOWN = '{DOWN}'
RIGHT = '{RIGHT}'
TAB = '{VK_TAB}'
ESC = '{ESC}'
ENTER = '{VK_RETURN}'