Skip to content

Commit

Permalink
Update task_manager_index.py
Browse files Browse the repository at this point in the history
  • Loading branch information
midoks committed Jun 3, 2024
1 parent 3ccf084 commit 93ef365
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions plugins/task_manager/task_manager_index.py
Original file line number Diff line number Diff line change
Expand Up @@ -1186,6 +1186,13 @@ def get_cron_list(self, get = {}):
cronList = self.search_cron(cronList, get.search)
return cronList

# 外部接口 强制结束会话
def pkill_session(self, get= {}):
if not 'pts' in get:
return mw.returnData(False, '缺少参数!')
mw.execShell("pkill -kill -t " + get['pts'])
return mw.returnData(True, '已强行结束会话[' + get['pts'] + ']')

# 获取当前会话
def get_who(self, get = {}):
whoTmp = mw.execShell('who')[0]
Expand Down Expand Up @@ -1239,6 +1246,9 @@ def get_run_list(args = {}):
def get_cron_list(args = {}):
return mc_instance.get_cron_list(args)

def pkill_session(args = {}):
return mc_instance.pkill_session(args)

def get_who(args = {}):
return mc_instance.get_who(args)

Expand Down

0 comments on commit 93ef365

Please sign in to comment.