Update: Implement bulk update functionality using list of document IDs and updated data
This commit introduces a new function, `insert_mongo_documents_to_postgres`, which allows for the bulk updating of documents in a PostgreSQL table. It takes a list of document IDs and a dictionary containing the updated data as input. This method simplifies the process by reducing the number of individual insert statements required. The changes include: 1. Adding a new function `insert_mongo_documents_to_postgres` to handle the bulk update. 2. Updating the existing code to call this new function when required. 3. Refactoring the `MongoDocumentInserter` class to encapsulate common functionality for document insertion and updating. This refactoring enhances maintainability and efficiency by reducing redundancy in the codebase.
This commit is contained in:
+1
-1
@@ -24,4 +24,4 @@ dbsync.log.*
|
||||
/temp/tvmaze_updates.json
|
||||
/temp.skip_ids.txt
|
||||
/archived
|
||||
/settings/tvsync_settings.cfg
|
||||
settings/tvsync_settings.cfg
|
||||
|
||||
Reference in New Issue
Block a user