add debugging logs for seeding script

This commit is contained in:
2026-03-30 11:00:56 -05:00
parent b515f1c8f6
commit e6373267b1

View File

@@ -52,12 +52,16 @@ func saveTasks(db *pgxpool.Pool, ctx context.Context, tasks []models.Task) error
}
func main() {
fmt.Println("Starting seed process")
ctx, cancel := context.WithTimeout(context.Background(), 20*time.Second)
defer cancel()
db, err := pgxpool.New(ctx, config.Db.Url)
if err != nil {
log.Fatalf("Unable to create connection pool: %v", err)
} else {
fmt.Println("Successfully connected to the database")
}
defer db.Close()