Remove TED XML Parser and Scraper Implementation
- Deleted the TED XML parser and scraper implementation files, including parser.go, scraper.go, and ted.go, to streamline the codebase and eliminate unused components. - Commented out the initialization code in main.go to prevent execution while maintaining the structure for future reference. - Removed the README.md for the TED package, which contained documentation for the now-deleted parser and scraper functionalities.
This commit is contained in:
+23
-29
@@ -1,37 +1,31 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
"tm/cmd/scraper/bootstrap"
|
||||
)
|
||||
|
||||
func main() {
|
||||
// Load configuration
|
||||
config, err := bootstrap.InitConfig()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
// // Load configuration
|
||||
// config, err := bootstrap.InitConfig()
|
||||
// if err != nil {
|
||||
// panic(err)
|
||||
// }
|
||||
|
||||
// Initialize logger
|
||||
appLogger := bootstrap.InitLogger(config.Logging)
|
||||
appLogger.Info("Starting TED scraper application", map[string]interface{}{
|
||||
"version": "1.0.0",
|
||||
})
|
||||
// // Initialize logger
|
||||
// appLogger := bootstrap.InitLogger(config.Logging)
|
||||
// appLogger.Info("Starting TED scraper application", map[string]interface{}{
|
||||
// "version": "1.0.0",
|
||||
// })
|
||||
|
||||
// Initialize MongoDB connection
|
||||
mongoManager := bootstrap.InitMongoDB(config.Database.MongoDB, appLogger)
|
||||
defer func() {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
defer cancel()
|
||||
if err := mongoManager.Close(ctx); err != nil {
|
||||
appLogger.Error("Failed to close MongoDB connection", map[string]interface{}{
|
||||
"error": err.Error(),
|
||||
})
|
||||
}
|
||||
}()
|
||||
// // Initialize MongoDB connection
|
||||
// mongoManager := bootstrap.InitMongoDB(config.Database.MongoDB, appLogger)
|
||||
// defer func() {
|
||||
// ctx, cancel := context.WithTimeout(context.Background(), 10*time.Second)
|
||||
// defer cancel()
|
||||
// if err := mongoManager.Close(ctx); err != nil {
|
||||
// appLogger.Error("Failed to close MongoDB connection", map[string]interface{}{
|
||||
// "error": err.Error(),
|
||||
// })
|
||||
// }
|
||||
// }()
|
||||
|
||||
bootstrap.InitTEDScraper(*config, mongoManager, appLogger)
|
||||
// bootstrap.InitTEDScraper(*config, mongoManager, appLogger)
|
||||
|
||||
appLogger.Info("TED scraper application stopped", map[string]interface{}{})
|
||||
// appLogger.Info("TED scraper application stopped", map[string]interface{}{})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user