mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-05-21 00:36:43 +08:00
Closes https://github.com/infiniflow/ragflow/issues/13939 ## What problem does this PR solve? The Google Drive connector fails to detect new files after the initial sync (#13939). The root cause is that `generate_time_range_filter()` applies a strict `modifiedTime > poll_range_start` cutoff when querying the Google Drive API. Files uploaded to Google Drive that retain their original `modifiedTime` (common behavior) get silently excluded if their timestamp predates the last sync's cutoff. Unlike the Confluence and Jira connectors which use a configurable time buffer (`CONFLUENCE_SYNC_TIME_BUFFER_SECONDS`) to offset `poll_range_start` backward, the Google Drive connector had no such mechanism — resulting in a razor-sharp timestamp boundary with zero tolerance for overlap. ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue) ## Summary * **New Features** * Added a configurable time buffer for Google Drive synchronization to address timing delays and improve sync reliability. * Improved file detection logic to include recently created files alongside modified ones, reducing missed synchronizations.