Refactor Worker Initialization to Integrate GLM SDK
- Updated the worker initialization process to include the new GLM SDK, enhancing the worker's capabilities for translation tasks. - Modified the InitWorker function and NewNoticeWorker constructor to accept the GLM service, ensuring a cohesive integration. - Implemented the GLM service initialization and logging for successful setup, improving maintainability and usability. - Updated the NoticeWorker to utilize the GLM SDK for translating notice titles and descriptions, enhancing functionality and user experience.
This commit is contained in:
@@ -79,9 +79,6 @@ func (s *TEDScraper) mapGenericNoticeToTender(doc TEDDocument, sourceFileURL, so
|
||||
},
|
||||
}
|
||||
|
||||
// Generate the tender ID after creating the tender
|
||||
t.TenderID = GenerateTenderID(t)
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
@@ -228,9 +225,6 @@ func (s *TEDScraper) mapToTender(cn *ContractNotice, sourceFileURL, sourceFileNa
|
||||
t.OfficialLanguages = languages
|
||||
}
|
||||
|
||||
// Generate unique tender ID
|
||||
t.TenderID = GenerateTenderID(t)
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
@@ -308,9 +302,6 @@ func (s *TEDScraper) mapContractAwardNoticeToTender(can *ContractAwardNotice, so
|
||||
}
|
||||
}
|
||||
|
||||
// Generate unique tender ID
|
||||
t.TenderID = GenerateTenderID(t)
|
||||
|
||||
return t
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user