def list(self, task_list=None): """Print a list of all tasks.""" headers = ['uuid', 'created_at', 'status', 'failed', 'tag'] task_list = task_list or db.task_list() if task_list: common_cliutils.print_list(task_list, headers) else: print(_("There are no tasks. To run a new task, use:" "\nrally task start"))
def list(self, task_list=None): """Print a list of all tasks.""" headers = ['uuid', 'created_at', 'status', 'failed', 'tag'] task_list = task_list or db.task_list() if task_list: common_cliutils.print_list(task_list, headers) else: print( _("There are no tasks. To run a new task, use:" "\nrally task start"))
def list(self): """Print a list of all tasks.""" headers = ['uuid', 'created_at', 'status', 'failed'] table = prettytable.PrettyTable(headers) for t in db.task_list(): r = [t['uuid'], str(t['created_at']), t['status'], t['failed']] table.add_row(r) print(table)
def list(self, task_list=None): """List all tasks, started and finished.""" headers = ['uuid', 'created_at', 'status', 'failed', 'tag'] task_list = task_list or db.task_list() if task_list: common_cliutils.print_list(task_list, headers, sortby_index=headers.index( 'created_at')) else: print(_("There are no tasks. To run a new task, use:" "\nrally task start"))
def list(self, task_list=None): """List all tasks, started and finished.""" headers = ['uuid', 'created_at', 'status', 'failed', 'tag'] task_list = task_list or db.task_list() if task_list: common_cliutils.print_list( task_list, headers, sortby_index=headers.index('created_at')) else: print( _("There are no tasks. To run a new task, use:" "\nrally task start"))
def list(self, task_list=None): """Print a list of all tasks.""" headers = ["uuid", "created_at", "status", "failed", "tag"] task_list = task_list or db.task_list() if task_list: table = prettytable.PrettyTable(headers) for t in task_list: r = [t["uuid"], str(t["created_at"]), t["status"], t["failed"], t["tag"]] table.add_row(r) print(table) else: print(_("There are no tasks. To run a new task, use:" "\nrally task start"))
def list(self, task_list=None): """Print a list of all tasks.""" headers = ['uuid', 'created_at', 'status', 'failed', 'tag'] task_list = task_list or db.task_list() if task_list: table = prettytable.PrettyTable(headers) for t in task_list: r = [t['uuid'], str(t['created_at']), t['status'], t['failed'], t['tag']] table.add_row(r) print(table) else: print(_("There are no tasks. To run a new task, use:" "\nrally task start"))
def list(self, task_list=None): """Print a list of all tasks.""" headers = ['uuid', 'created_at', 'status', 'failed', 'tag'] task_list = task_list or db.task_list() if task_list: table = prettytable.PrettyTable(headers) for t in task_list: r = [ t['uuid'], str(t['created_at']), t['status'], t['failed'], t['tag'] ] table.add_row(r) print(table) else: print( _("There are no tasks. To run a new task, use:" "\nrally task start"))
def get_uuids(status=None, deployment=None): tasks = db.task_list(status=status, deployment=deployment) return sorted(task["uuid"] for task in tasks)
def get_uuids(status): tasks = db.task_list(status=status) return sorted(task['uuid'] for task in tasks)
def test_task_list_empty(self): self.assertEqual([], db.task_list())
def get_uuids(status, active=True): tasks = db.task_list(status=status, active=active) return sorted(task["uuid"] for task in tasks)
def list(status=None, deployment=None): return [Task(db_task) for db_task in db.task_list(status, deployment)]
def get_tasks_uuid_from_db(self, deployment_id): tasks = db.task_list(deployment=deployment_id) return [task.uuid for task in tasks]