mirror of
https://github.com/midoks/mdserver-web.git
synced 2026-10-10 01:29:26 +08:00
Update tasks.py
This commit is contained in:
+5
-1
@@ -98,7 +98,7 @@ def getTaskPage(
|
||||
return rdata
|
||||
|
||||
def getTaskFirstByRun() -> None:
|
||||
data = mw.M('tasks').where('status=? or status=0', (-1,)).field(__FIELD).order('id asc').find()
|
||||
data = mw.M('tasks').where('status!=?', (1,)).field(__FIELD).order('id asc').find()
|
||||
if data is None:
|
||||
return None
|
||||
return data
|
||||
@@ -109,6 +109,10 @@ def getTaskRunList(page = 1,size = 10):
|
||||
task_list = mw.M('tasks').where('status!=?', (1,)).field(__FIELD).limit(limit).order('id asc').select()
|
||||
return task_list
|
||||
|
||||
def getTaskRunAll():
|
||||
task_list = mw.M('tasks').where('status!=?', (1,)).field(__FIELD).order('id asc').select()
|
||||
return task_list
|
||||
|
||||
def getTaskRunPage(page = 1, size = 10):
|
||||
start = (page - 1) * size
|
||||
limit = str(start) + ',' + str(size)
|
||||
|
||||
Reference in New Issue
Block a user