feat: add MANZANA migration job and update related processing logic

This commit is contained in:
2026-04-08 10:16:27 -05:00
parent 3765e8adb3
commit 75b04d4b2e
5 changed files with 19 additions and 18 deletions

View File

@@ -13,6 +13,11 @@ type MigrationJob struct {
}
var migrationJobs []MigrationJob = []MigrationJob{
{
Schema: "Cartografia",
Table: "MANZANA",
PrimaryKey: "GDB_ARCHIVE_OID",
},
{
Schema: "Red",
Table: "PUERTO",

View File

@@ -79,17 +79,17 @@ func processMigrationJob(sourceDb *sql.DB, targetDb *pgxpool.Pool, job Migration
}()
var wgPostgresLoaders sync.WaitGroup
// postgresLoaderCtx := context.Background()
postgresLoaderCtx := context.Background()
log.Infof("Starting %d PostgreSQL loader(s)...", NumLoaders)
loaderStartTime := time.Now()
for range NumLoaders {
wgPostgresLoaders.Go(func() {
// if err := loadRowsPostgres(postgresLoaderCtx, job, sourceColTypes, targetDb, chRowsTransform); err != nil {
// log.Error("Unexpected error loading data into postgres: ", err)
// }
fakeLoader(job, sourceColTypes, chRowsTransform)
if err := loadRowsPostgres(postgresLoaderCtx, job, targetColTypes, targetDb, chRowsTransform); err != nil {
log.Error("Unexpected error loading data into postgres: ", err)
}
// fakeLoader(job, sourceColTypes, chRowsTransform)
})
}