Files
narratio/internal/app/workspace_lock.go
Eric Rakestraw 831665c913
All checks were successful
ci/woodpecker/tag/release Pipeline was successful
Align module path with Narratio v4 release
2026-12-03 02:01:48 +00:00

18 lines
567 B
Go

package app
import (
"context"
"fmt"
"gitea.maximumdirect.net/eric/narratio/v4/internal/artifacts"
"gitea.maximumdirect.net/eric/narratio/v4/internal/logging"
)
// acquireWorkspaceLock identifies acquisition before a potentially blocking wait.
func acquireWorkspaceLock(ctx context.Context, store artifacts.Store, root string, reporter logging.Reporter) (*artifacts.LockHandle, error) {
if reporter != nil {
reporter.Progress(fmt.Sprintf("acquiring workspace lock %q", artifacts.WorkspaceLockPath(root)))
}
return store.AcquireWorkspaceLockContext(ctx)
}