Skip to main content

polling_loop

Function polling_loop 

Source
pub async fn polling_loop<R: CommandRunner + 'static>(
    executor: Arc<PipelineExecutor<R>>,
    auto_merge: bool,
    cancel_token: CancellationToken,
) -> Result<()>
Expand description

Poll for new issues and run them through the pipeline.

Unlike run_batch, this function continuously polls for new issues even while existing pipelines are running. Uses a shared semaphore and JoinSet that persist across poll cycles, with in-flight and deferred tracking to prevent double-spawning and avoid re-invoking the planner for issues whose dependency chain is already known.

Deferred issues (batch 2+) are stored locally and promoted automatically when their dependencies complete, saving planner tokens on subsequent poll cycles.