)
overall_progress = Progress(
TextColumn("[cyan]{task.description}"),
# TODO: Fix bar column not lining up with task_progress bars
# Maybe we can make a spacer text column for all the bars and truncate long filenames with [...]?
# labels: bug
BarColumn(),
TextColumn("[cyan]({task.completed} of {task.total})"),
)
# Create group of renderables
progress_group = Group(
worker_spinner,
task_progress,
overall_progress,
)
overall_id = overall_progress.add_task(
description="Total task progress",
total=len(callable_tasks),
)
worker_id = worker_spinner.add_task(
description="Active worker count", worker_count=0
)
# If not finished, report progress
mini_bars = {}
active_workers = []
completed_tasks = 0
with Live(progress_group):
while not results.ready():
# Update overall progress
tt_data = tt.get_data(group_id=results.id)
if tt_data:
# Update overall task progress
task_event = tt_data.get("task-event")
if task_event:
# Finished a task, update completed
if task_event["status"] in ["SUCCESS", "FAILURE"]:
completed_tasks = completed_tasks + 1
overall_progress.update(
task_id=overall_id,
completed=completed_tasks,
total=len(callable_tasks),
)
# If we've got task progress update
progress = tt_data.get("task-progress")
if progress:
# is this progress data from a new task?
Fix bar column not lining up with task_progress bars
Maybe we can make a spacer text column for all the bars and truncate long filenames with [...]?
print(f"Matched tasks: {tt.matched_task_ids}")
If we've got task progress update
https://github.com/in03/Resolve-Proxy-Encoder/blob/553db65c74cd3e89e89d9757d48aef93d6de2167/resolve_proxy_encoder/queuer/queue.py#L98
c2a47cee1b78a9a629ae6d7bd5ffe18f91b261da