(taskid=None)
return jsonize({"success": True, "tasks": tasks, "tasks_num": len(tasks)})
List task pull
List task pull
List task pull
def task_list(taskid=None):
    """
    List task pull
    """
    tasks = {}

    for key in DataStore.tasks:
        if is_admin(taskid) or DataStore.tasks[key].remote_addr == request.remote_addr:
            tasks[key] = dejsonize(scan_status(key))["status"]

    logger.debug("[%s] Listed task pool (%s)" % (taskid, "admin" if is_admin(taskid) else request.remote_addr))
    return jsonize({"success": True, "tasks": tasks, "tasks_num": len(tasks)})
def task_list ( taskid = None ) : tasks = { } for key in DataStore . tasks : if is_admin ( taskid ) or DataStore . tasks [ key ] . remote_addr == request . remote_addr : tasks [ key ] = dejsonize ( scan_status ( key ) ) [ "status" ] logger . debug ( "[%s] Listed task pool (%s)" % ( taskid , "admin" if is_admin ( taskid ) else request . remote_addr ) ) return jsonize ( { "success" : True , "tasks" : tasks , "tasks_num" : len ( tasks ) } )