Report workspace lock acquisition before waiting
This commit is contained in:
17
internal/app/workspace_lock.go
Normal file
17
internal/app/workspace_lock.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package app
|
||||
|
||||
import (
|
||||
"context"
|
||||
"fmt"
|
||||
|
||||
"gitea.maximumdirect.net/eric/narratio/internal/artifacts"
|
||||
"gitea.maximumdirect.net/eric/narratio/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)
|
||||
}
|
||||
Reference in New Issue
Block a user