Skip to content

Commit

Permalink
add logs to sireneUL handler
Browse files Browse the repository at this point in the history
  • Loading branch information
Josquin Cornec committed Apr 26, 2024
1 parent 615217f commit 65fe4a8
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions pkg/ops/imports/imports.go
Original file line number Diff line number Diff line change
Expand Up @@ -515,25 +515,33 @@ func importUnitesLegales(ctx context.Context) error {
if viper.GetString("source.sireneULPath") == "" || viper.GetString("source.geoSirenePath") == "" {
return utils.NewJSONerror(http.StatusConflict, "not supported, missing parameters in server configuration")
}
slog.Info("Truncate entreprise table", slog.String("status", "start"))

slog.Info("Truncate entreprise table", slog.String("status", "start"))
err := TruncateEntreprise(ctx)
if err != nil {
return err
}
slog.Info("Truncate entreprise table", slog.String("status", "end"))

slog.Info("Drop entreprise index", slog.String("status", "start"))
err = DropEntrepriseIndex(ctx)
if err != nil {
return err
}
slog.Info("Drop entreprise index", slog.String("status", "end"))

slog.Info("Insert sirene unite legal", slog.String("status", "start"))
err = InsertSireneUL(ctx)
if err != nil {
return err
}
slog.Info("Insert sirene unite legal", slog.String("status", "end"))

slog.Info("Create entreprise index", slog.String("status", "start"))
err = CreateEntrepriseIndex(ctx)
slog.Info("Create entreprise index", slog.String("status", "end"))

return CreateEntrepriseIndex(ctx)
return err
}

func importStockEtablissement(ctx context.Context) error {
Expand Down

0 comments on commit 65fe4a8

Please sign in to comment.