feat: 优化 DBPortManger 处理 port 的数据类型

pull/8892/head
Jiangjie.Bai 2022-09-22 19:18:38 +08:00
parent 32b6a1f1a4
commit 55a10a8d1d
1 changed files with 4 additions and 0 deletions

View File

@ -60,6 +60,10 @@ class DBPortManager(object):
)
def get_db_by_port(self, port):
try:
port = int(port)
except Exception as e:
raise JMSException('Port type error: {}'.format(e))
mapper = self.get_mapper()
db_id = mapper.get(port, None)
if not db_id: