@get('/admin/<taskid>/list')
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)})

@ get ( '/admin/<taskid>/list' ) 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 ) } )
list task pull .