taskiq-pipelines icon indicating copy to clipboard operation
taskiq-pipelines copied to clipboard

Empty `.map` pipeline never completes

Open fubuloubu opened this issue 1 year ago • 1 comments
trafficstars

I have a pipeline task that's like Pipeline(broker, produces_array).map(another_task) but it never completes when I want using task.wait_result if produces_array returns an empty list

fubuloubu avatar Oct 24 '24 23:10 fubuloubu

I think if you just bail here when len is 0, it would work:

https://github.com/taskiq-python/taskiq-pipelines/blob/ba056d7bfc0c46ea1235323c93ed6ec09b64ed41/taskiq_pipelines/steps/mapper.py#L109-L111

fubuloubu avatar Oct 25 '24 04:10 fubuloubu