Refactor dashboard repository to integrate ProcedureDocumentsLister
- Introduced the ProcedureDocumentsLister interface to list contract folders with scraped documents, enhancing the accuracy of document-scrape statistics. - Updated the dashboard repository to accept ProcedureDocumentsLister as a dependency, allowing for improved data retrieval. - Implemented tests for the new functionality, ensuring proper handling of scraped document folder IDs and error propagation. This update enhances the dashboard's capability to manage and report on scraped documents, improving overall system efficiency and data integrity.
This commit is contained in:
+3
-1
@@ -171,6 +171,7 @@ func main() {
|
||||
// Initialize AI Summarizer service
|
||||
var aiSummarizerClient tender.AISummarizerClient
|
||||
var aiSummarizerStorage tender.AISummarizerStorage
|
||||
var procedureDocumentsLister dashboard.ProcedureDocumentsLister
|
||||
var aiRecommendationClient company.AIRecommendationClient
|
||||
var aiPipelineClient ai_pipeline.Client
|
||||
|
||||
@@ -181,6 +182,7 @@ func main() {
|
||||
}
|
||||
if s := bootstrap.InitAISummarizerStorage(conf.AISummarizer, logger); s != nil {
|
||||
aiSummarizerStorage = s
|
||||
procedureDocumentsLister = s
|
||||
}
|
||||
|
||||
// Initialize authorization service
|
||||
@@ -230,7 +232,7 @@ func main() {
|
||||
cmsService := cms.NewService(cmsRepository, logger)
|
||||
kanbanService := kanban.NewService(boardRepository, columnRepository, cardRepository, goRulesClient, conf.GoRules.RuleID, logger)
|
||||
documentScraperService := document_scraper.NewService(tenderRepository, logger)
|
||||
dashboardRepository := dashboard.NewRepository(mongoManager, logger)
|
||||
dashboardRepository := dashboard.NewRepository(mongoManager, logger, procedureDocumentsLister)
|
||||
dashboardService := dashboard.NewService(dashboardRepository, logger)
|
||||
aiPipelineService := ai_pipeline.NewService(aiPipelineClient, logger, tenderService)
|
||||
logger.Info("Services initialized successfully", map[string]interface{}{
|
||||
|
||||
Reference in New Issue
Block a user