def status():
cron = []
task = []
for item in db.cron.fetchall():
plan, status = db.status.fetch(item['id'])
last = status[1:status.find(']')]
status = status.split(' - ')[-1]
cron.append([item['path'], plan, last, status])
for item in db.taskq.fetchall():
length = db.task.length(item[0])
task.append(list(item) + [length])
context = {
'title': '????',
'cron': cron,
'task': task,
'conf': conf,
'notice': flash()
}
return template(stpl.status, context)
评论列表
文章目录