Commit a2592688 authored by ibuler's avatar ibuler

[Bugfix] 修复handle task

parent b68b83df
...@@ -7,6 +7,10 @@ It's implement a ssh server and a web terminal server, ...@@ -7,6 +7,10 @@ It's implement a ssh server and a web terminal server,
User can connect them except jumpserver openssh server and connect.py User can connect them except jumpserver openssh server and connect.py
pre version. pre version.
# Warning
Coco has been replace by [koko](https://github.com/jumpserver/koko.git)
From v1.5.2, coco will be stop update
## Install ## Install
......
...@@ -72,13 +72,22 @@ class ProxyNamespace(BaseNamespace): ...@@ -72,13 +72,22 @@ class ProxyNamespace(BaseNamespace):
client.chan = ws_proxy client.chan = ws_proxy
self.emit('room', {'room': client_id, 'secret': secret}) self.emit('room', {'room': client_id, 'secret': secret})
join_room(client_id) join_room(client_id)
if not asset_id or not system_user_id: if not asset_id or not system_user_id:
msg = "Not asset id or system user id found".format(
asset_id, system_user_id
)
logger.error(msg)
return return
asset = app_service.get_asset(asset_id) asset = app_service.get_asset(asset_id)
system_user = app_service.get_system_user(system_user_id) system_user = app_service.get_system_user(system_user_id)
if not asset or not system_user: if not asset or not system_user:
msg = "No asset or system user found {} {}: {} {}".format(
asset_id, system_user_id, asset, system_user
)
logger.error(msg)
return return
forwarder = ProxyServer(client, asset, system_user) forwarder = ProxyServer(client, asset, system_user)
......
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