Skip to content

Commit

Permalink
sync cmd: Rename runRecipes to runSyncCommandLogic
Browse files Browse the repository at this point in the history
  • Loading branch information
andygrunwald committed Sep 15, 2024
1 parent 7c7b59f commit b5bd227
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,8 @@ func RunSyncCommand(cmd *cobra.Command, cmdArgs []string) {
}
logger.Info("Credential items loaded from vault", "num_items", len(vaultItems), "provider", "1Password", "cli_command", vaultConfigBinary, "vault", vaultConfigBase, "tag", vaultConfigTag)

// Run recipes
go runRecipes(p, logger, supplier, localOICDBChecksum, localOICDBSchemaChecksum, vaultProvider, documentArchive, recipeParser, buchhalterAPIClient)
// Run the primary logic
go runSyncCommandLogic(p, logger, supplier, localOICDBChecksum, localOICDBSchemaChecksum, vaultProvider, documentArchive, recipeParser, buchhalterAPIClient)

if _, err := p.Run(); err != nil {
logger.Error("Error running program", "error", err)
Expand All @@ -138,7 +138,7 @@ func RunSyncCommand(cmd *cobra.Command, cmdArgs []string) {
}
}

func runRecipes(p *tea.Program, logger *slog.Logger, supplier, localOICDBChecksum, localOICDBSchemaChecksum string, vaultProvider *vault.Provider1Password, documentArchive *archive.DocumentArchive, recipeParser *parser.RecipeParser, buchhalterAPIClient *repository.BuchhalterAPIClient) {
func runSyncCommandLogic(p *tea.Program, logger *slog.Logger, supplier, localOICDBChecksum, localOICDBSchemaChecksum string, vaultProvider *vault.Provider1Password, documentArchive *archive.DocumentArchive, recipeParser *parser.RecipeParser, buchhalterAPIClient *repository.BuchhalterAPIClient) {
p.Send(utils.ViewStatusUpdateMsg{Message: "Building archive index"})
logger.Info("Building document archive index ...")

Expand Down

0 comments on commit b5bd227

Please sign in to comment.