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 tracking to prevent double-spawning.

The planner receives in-flight metadata so it can avoid scheduling conflicting work in batch 1. Only batch 1 issues are spawned each cycle; deferred issues keep o-ready and naturally reappear on the next poll.