total=len(callable_tasks),
)
# TODO: Check this works!
# Also, rework the redis pub/sub to use callbacks
# If we've got task progress, update
progress = tt_data.get("task-progress")
if progress:
# Update progress for correct task
progress_vals.update({progress.task_id: progress.seconds_processed})
# Get up-to-date average
prog_list = list(progress_vals.values())
prog_sum = sum(prog_list)
avg_progress = (prog_sum / callable_tasks)
# Update average progress bar
average_progress.update(
task_id=average_id,
completed=avg_progress,
)
# Add new workers
if progress["worker_name"] not in active_workers:
Check this works!
Also, rework the redis pub/sub to use callbacks
https://github.com/in03/Resolve-Proxy-Encoder/blob/c8b74b93cffcbf5ccd578d1cb839bcf2699521d0/resolve_proxy_encoder/queuer/queue.py#L153
515ccb08ac3021b271b74c3268f4ea2dd26505ff