Skip to content

Commit

Permalink
Shortcut to get an UnlockPhase for a LockPhase
Browse files Browse the repository at this point in the history
Signed-off-by: Kimmo Lehto <[email protected]>
  • Loading branch information
kke committed Sep 30, 2024
1 parent 0464376 commit 27fd16a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions phase/lock.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ func (p *Lock) CleanUp() {
p.Cancel()
}

// UnlockPhase returns an unlock phase for this lock phase
func (p *Lock) UnlockPhase() Phase {
return &Unlock{Cancel: p.Cancel}
}

// Run the phase
func (p *Lock) Run() error {
if err := p.parallelDo(p.Config.Spec.Hosts, p.startLock); err != nil {
Expand Down

0 comments on commit 27fd16a

Please sign in to comment.