feat: add MANZANA migration job and update related processing logic
This commit is contained in:
@@ -13,6 +13,11 @@ type MigrationJob struct {
|
||||
}
|
||||
|
||||
var migrationJobs []MigrationJob = []MigrationJob{
|
||||
{
|
||||
Schema: "Cartografia",
|
||||
Table: "MANZANA",
|
||||
PrimaryKey: "GDB_ARCHIVE_OID",
|
||||
},
|
||||
{
|
||||
Schema: "Red",
|
||||
Table: "PUERTO",
|
||||
|
||||
@@ -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)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user