pub struct WorktreePool { /* private fields */ }Expand description
Worktree execution pool
Implementations§
Source§impl WorktreePool
impl WorktreePool
Sourcepub fn new(config: PoolConfig, worktree_base: Option<PathBuf>) -> Result<Self>
pub fn new(config: PoolConfig, worktree_base: Option<PathBuf>) -> Result<Self>
Create a new worktree pool with automatic repository discovery
§Arguments
config- Pool configurationworktree_base- Optional override for worktree base directory
Sourcepub fn new_with_path(
repo_path: impl AsRef<Path>,
worktree_base: impl AsRef<Path>,
config: PoolConfig,
) -> Result<Self>
pub fn new_with_path( repo_path: impl AsRef<Path>, worktree_base: impl AsRef<Path>, config: PoolConfig, ) -> Result<Self>
Create a worktree pool with explicit repository path
Sourcepub async fn execute_parallel<F, Fut>(
&self,
tasks: Vec<WorktreeTask>,
executor: F,
) -> PoolExecutionResultwhere
F: Fn(WorktreeInfo, WorktreeTask) -> Fut + Send + Sync + Clone + 'static,
Fut: Future<Output = Result<Value>> + Send + 'static,
pub async fn execute_parallel<F, Fut>(
&self,
tasks: Vec<WorktreeTask>,
executor: F,
) -> PoolExecutionResultwhere
F: Fn(WorktreeInfo, WorktreeTask) -> Fut + Send + Sync + Clone + 'static,
Fut: Future<Output = Result<Value>> + Send + 'static,
Execute multiple tasks in parallel worktrees
§Arguments
tasks- Vector of tasks to executeexecutor- Async function to execute in each worktree
§Returns
Pool execution result with individual task results
§Fail-Fast Behavior
If fail_fast is enabled in config, execution stops after the first failure
and all remaining tasks are cancelled.
Sourcepub async fn execute_simple<F, Fut>(
&self,
issue_numbers: Vec<u64>,
executor: F,
) -> PoolExecutionResult
pub async fn execute_simple<F, Fut>( &self, issue_numbers: Vec<u64>, executor: F, ) -> PoolExecutionResult
Execute tasks with automatic worktree lifecycle management
This is a simplified version that automatically creates, executes, and cleans up worktrees
Sourcepub fn manager(&self) -> &Arc<WorktreeManager>
pub fn manager(&self) -> &Arc<WorktreeManager>
Get reference to underlying manager
Auto Trait Implementations§
impl Freeze for WorktreePool
impl !RefUnwindSafe for WorktreePool
impl Send for WorktreePool
impl Sync for WorktreePool
impl Unpin for WorktreePool
impl !UnwindSafe for WorktreePool
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more