Migrate lock commands to independent objects
This commit is contained in:
@@ -46,8 +46,8 @@ type remoteCurrentStateCheck struct {
|
||||
Err error
|
||||
}
|
||||
|
||||
type effectiveLocksCheck struct {
|
||||
Locks *effectiveLocks
|
||||
type remoteLocksCheck struct {
|
||||
Locks []artifacts.RemoteLock
|
||||
Err error
|
||||
}
|
||||
|
||||
@@ -194,12 +194,19 @@ func inspectRemoteCurrentState(ctx context.Context, cfg *config.Config, store st
|
||||
return remoteCurrentStateCheck{State: current}
|
||||
}
|
||||
|
||||
func inspectEffectiveLocks(ctx context.Context, cfg *config.Config, store storage.ObjectStore) effectiveLocksCheck {
|
||||
locks, err := loadEffectiveLocks(ctx, cfg, store)
|
||||
if err != nil {
|
||||
return effectiveLocksCheck{Err: err}
|
||||
func inspectRemoteLocks(ctx context.Context, cfg *config.Config, store storage.ObjectStore) remoteLocksCheck {
|
||||
if store == nil {
|
||||
return remoteLocksCheck{}
|
||||
}
|
||||
return effectiveLocksCheck{Locks: locks}
|
||||
sessionPrefix, err := artifacts.ResolvePublishSessionPrefix(cfg, nil)
|
||||
if err != nil {
|
||||
return remoteLocksCheck{Err: err}
|
||||
}
|
||||
locks, err := artifacts.ListRemoteLocks(ctx, store, sessionPrefix)
|
||||
if err != nil {
|
||||
return remoteLocksCheck{Err: err}
|
||||
}
|
||||
return remoteLocksCheck{Locks: locks}
|
||||
}
|
||||
|
||||
func resolveLocalInspectionAudioPaths(sessionDir string, inputs config.SessionInputsConfig) ([]string, error) {
|
||||
|
||||
Reference in New Issue
Block a user