Remove unused dependency wrappers
This commit is contained in:
@@ -41,10 +41,6 @@ func cleanWithDependencies(ctx context.Context, args []string, out io.Writer, de
|
||||
return cleanSessionWithDependencies(ctx, flags, dryRun, clearCache, out, deps)
|
||||
}
|
||||
|
||||
func cleanSession(ctx context.Context, flags commonConfigFlags, dryRun, clearCache bool, out io.Writer) error {
|
||||
return cleanSessionWithDependencies(ctx, flags, dryRun, clearCache, out, commandDependencies{})
|
||||
}
|
||||
|
||||
func cleanSessionWithDependencies(ctx context.Context, flags commonConfigFlags, dryRun, clearCache bool, out io.Writer, deps commandDependencies) error {
|
||||
if strings.TrimSpace(flags.sessionID) == "" {
|
||||
return fmt.Errorf("clean: session_id is required unless --all is set")
|
||||
@@ -89,10 +85,6 @@ func cleanSessionWithDependencies(ctx context.Context, flags commonConfigFlags,
|
||||
return nil
|
||||
}
|
||||
|
||||
func cleanAllLocal(flags commonConfigFlags, dryRun, clearCache bool, out io.Writer) error {
|
||||
return cleanAllLocalWithDependencies(flags, dryRun, clearCache, out, commandDependencies{})
|
||||
}
|
||||
|
||||
func cleanAllLocalWithDependencies(flags commonConfigFlags, dryRun, clearCache bool, out io.Writer, deps commandDependencies) error {
|
||||
if strings.TrimSpace(flags.campaignPath) != "" ||
|
||||
strings.TrimSpace(flags.campaignFilePath) != "" ||
|
||||
@@ -207,10 +199,6 @@ func cleanableRootChildren(root, policy string) (string, []string, error) {
|
||||
return rootAbs, out, nil
|
||||
}
|
||||
|
||||
func cleanSessionAudioCache(ctx context.Context, cfg *config.Config, dryRun bool, out io.Writer) error {
|
||||
return cleanSessionAudioCacheWithDependencies(ctx, cfg, dryRun, out, commandDependencies{})
|
||||
}
|
||||
|
||||
func cleanSessionAudioCacheWithDependencies(ctx context.Context, cfg *config.Config, dryRun bool, out io.Writer, deps commandDependencies) error {
|
||||
if cfg.Session.Inputs.AudioS3 == nil {
|
||||
fmt.Fprintln(out, "Cache: skipped (session does not use audio_s3)")
|
||||
|
||||
@@ -161,10 +161,6 @@ func loadPipelineCampaignConfigWithDependencies(pipelineFlag, campaignFlag, camp
|
||||
return &loaded, nil
|
||||
}
|
||||
|
||||
func loadPipelineConfig(pipelineFlag string, opts config.PipelineLoadOptions) (string, *config.PipelineConfig, error) {
|
||||
return loadPipelineConfigWithDependencies(pipelineFlag, opts, commandDependencies{})
|
||||
}
|
||||
|
||||
func loadPipelineConfigWithDependencies(pipelineFlag string, opts config.PipelineLoadOptions, deps commandDependencies) (string, *config.PipelineConfig, error) {
|
||||
deps = normalizeCommandDependencies(deps)
|
||||
resolvedPipelinePath, err := resolvePipelineConfigPath(pipelineFlag)
|
||||
|
||||
@@ -110,10 +110,6 @@ func artifactsWithDependencies(ctx context.Context, args []string, out io.Writer
|
||||
}
|
||||
}
|
||||
|
||||
func loadHelperContext(ctx context.Context, flags commonConfigFlags, needStore bool) (*config.Config, storage.ObjectStore, []artifacts.RemoteLock, *manifest.Manifest, func(), error) {
|
||||
return loadHelperContextWithDependencies(ctx, flags, needStore, commandDependencies{})
|
||||
}
|
||||
|
||||
func loadHelperContextWithDependencies(ctx context.Context, flags commonConfigFlags, needStore bool, deps commandDependencies) (*config.Config, storage.ObjectStore, []artifacts.RemoteLock, *manifest.Manifest, func(), error) {
|
||||
deps = normalizeCommandDependencies(deps)
|
||||
loaded, err := loadCommandConfigWithDependencies(ctx, flags.pipelinePath, flags.campaignPath, flags.campaignFilePath, flags.sessionPath, flags.sessionOptions(), deps)
|
||||
@@ -159,10 +155,6 @@ func loadHelperContextWithDependencies(ctx context.Context, flags commonConfigFl
|
||||
return cfg, store, locks, m, func() { _ = loaded.Close() }, nil
|
||||
}
|
||||
|
||||
func objectStoreIfConfigured(ctx context.Context, cfg *config.Config) (storage.ObjectStore, error) {
|
||||
return objectStoreIfConfiguredWithDependencies(ctx, cfg, commandDependencies{})
|
||||
}
|
||||
|
||||
func objectStoreIfConfiguredWithDependencies(ctx context.Context, cfg *config.Config, deps commandDependencies) (storage.ObjectStore, error) {
|
||||
if cfg == nil || cfg.Pipeline == nil || cfg.Pipeline.Storage.S3 == nil || strings.TrimSpace(cfg.Pipeline.Storage.S3.Bucket) == "" {
|
||||
return nil, nil
|
||||
|
||||
@@ -129,10 +129,6 @@ func locksRemoveWithDependencies(ctx context.Context, args []string, out io.Writ
|
||||
return err
|
||||
}
|
||||
|
||||
func loadLockCommandContext(ctx context.Context, flags commonConfigFlags) (*config.Config, storage.ObjectStore, string, func(), error) {
|
||||
return loadLockCommandContextWithDependencies(ctx, flags, commandDependencies{})
|
||||
}
|
||||
|
||||
func loadLockCommandContextWithDependencies(ctx context.Context, flags commonConfigFlags, deps commandDependencies) (*config.Config, storage.ObjectStore, string, func(), error) {
|
||||
deps = normalizeCommandDependencies(deps)
|
||||
loaded, err := loadCommandConfigWithDependencies(ctx, flags.pipelinePath, flags.campaignPath, flags.campaignFilePath, flags.sessionPath, flags.sessionOptions(), deps)
|
||||
|
||||
Reference in New Issue
Block a user