barrel/build: Cleanup code
This commit is contained in:
parent
b86e6294de
commit
e9b88b9991
1 changed files with 1 additions and 2 deletions
|
|
@ -18,8 +18,7 @@ import (
|
||||||
// It also logs the current time into the metadata belonging to this instance.
|
// It also logs the current time into the metadata belonging to this instance.
|
||||||
func (barrel *Barrel) Build(ctx context.Context, progress io.Writer, start bool) error {
|
func (barrel *Barrel) Build(ctx context.Context, progress io.Writer, start bool) error {
|
||||||
if !barrel.Locker.TryLock(ctx) {
|
if !barrel.Locker.TryLock(ctx) {
|
||||||
err := locker.Locked
|
return locker.Locked
|
||||||
return err
|
|
||||||
}
|
}
|
||||||
defer barrel.Locker.Unlock(ctx)
|
defer barrel.Locker.Unlock(ctx)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue