Skip to content

Pipeline should stop if len(context) == 0 #78

@ARMmaster17

Description

@ARMmaster17

Describe the bug
When using the OutputMode.FILTER option, it is possible for the pipeline to continue running even though there are no contexts left. For performance reasons, I think it would be better if the pipeline just stopped immediately if all contexts are filtered out.

To Reproduce
Steps to reproduce the behavior:

  1. Create a pipeline of any type.
  2. Add a step that creates a null context KV value.
  3. Add a step that runs after the first step.
  4. Run the pipeline and see that both steps will run, but the seconds step is useless as there are no contexts to run.

Expected behavior
Pipeline should cleanly exit when there are no contexts left in the pipeline after any step execution.

Watergrid specific
Watergrid version/commit: f0e6be4
Python version: 3.10
Redis version (if using HAPipeline): N/A

Additional context
N/A

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingenhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions