Skip to content

Conversation

@lethanhson9902
Copy link

No description provided.

lethanhson9902 and others added 30 commits November 19, 2025 22:59
@lethanhson9902
Copy link
Author

merge

actions-user and others added 28 commits November 28, 2025 07:31
- Implement upsert functionality to prevent duplicate records using (source_id, title, date) unique index
- Add automatic cleanup of records older than 30 days
- Integrate upload functionality in both translation locations in main_vi.py
- Improve error handling for MongoDB operations
- Maintain backward compatibility with existing function signatures

Co-authored-by: Qwen-Coder <[email protected]>
- Modify mongo_uploader.py to upload entire file content as one document instead of splitting into individual news items
- Update translate_and_send_email() in main_vi.py to avoid double translation that created _vi_vi.txt files
- Remove file_size field from MongoDB document as requested
- Ensure only original .txt files (not already translated) are processed by the daily translation function
- Fix 'list index out of range' error in _ensure_unique_index function
- Update function to dynamically handle index keys with different numbers of elements
- Previously the function assumed fixed 3-element index keys, now it handles variable length keys
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants