def list(): """Returns the tasks submitted to EE by the current user. These include all currently running tasks as well as recently canceled or failed tasks. Returns: A list of Tasks. """ statuses = data.getTaskList() tasks = [] for status in statuses: tasks.append(Task(status['id'], { 'type': status['task_type'], 'description': status['description'], 'state': status['state'], })) return tasks
def list(): """Returns the tasks submitted to EE by the current user. These include all currently running tasks as well as recently canceled or failed tasks. Returns: A list of Tasks. """ statuses = data.getTaskList() tasks = [] for status in statuses: tasks.append( Task( status["id"], {"type": status["task_type"], "description": status["description"], "state": status["state"]}, ) ) return tasks