pull/632/head
Mr Chen 6 months ago
parent ef7b680e37
commit 72c6dbabab
  1. 2
      web/admin/task/__init__.py
  2. 11
      web/thisdb/tasks.py

@ -55,7 +55,7 @@ def get_task_speed():
if row is None:
return mw.returnData(False, '当前没有任务队列在执行-3!')
task_logfile = thisdb.getPanelTaskLog()
task_logfile = mw.getPanelTaskLog()
data = {}
data['name'] = row['name']

@ -78,7 +78,7 @@ def getTaskPage(
def getTaskFirstByRun() -> None:
data = mw.M('tasks').where('status=?', (-1,)).field(__FIELD).order('id asc').find()
if item is None:
if data is None:
return None
return data
@ -88,6 +88,15 @@ def getTaskRunList(
):
start = (page - 1) * size
limit = str(start) + ',' + str(size)
task_list = mw.M('tasks').where('', ()).field(__FIELD).limit(limit).order('id desc').select()
return task_list
def getTaskRunPage(
page: int | None = 1,
size: int | None = 10,
):
start = (page - 1) * size
limit = str(start) + ',' + str(size)
task_list = mw.M('tasks').where('', ()).field(__FIELD).limit(limit).order('id desc').select()
count = mw.M('tasks').where('', ()).count()

Loading…
Cancel
Save