change lookback to 7 days

This commit is contained in:
Arjun 2026-04-09 23:55:29 +05:30
parent 1d29ca8886
commit 924e136505
4 changed files with 6 additions and 6 deletions

View file

@ -24,7 +24,7 @@ const API_DELAY_MS = 1000; // 1 second delay between API calls
const RATE_LIMIT_RETRY_DELAY_MS = 60 * 1000; // Wait 1 minute on rate limit const RATE_LIMIT_RETRY_DELAY_MS = 60 * 1000; // Wait 1 minute on rate limit
const MAX_RETRIES = 3; // Maximum retries for rate-limited requests const MAX_RETRIES = 3; // Maximum retries for rate-limited requests
const MAX_BATCH_SIZE = 10; // Process max 10 documents per folder per sync const MAX_BATCH_SIZE = 10; // Process max 10 documents per folder per sync
const LOOKBACK_DAYS = 30; // Only sync documents from the last 30 days const LOOKBACK_DAYS = 7; // Only sync documents from the last 1 week
// --- Wake Signal for Immediate Sync Trigger --- // --- Wake Signal for Immediate Sync Trigger ---
let wakeResolve: (() => void) | null = null; let wakeResolve: (() => void) | null = null;

View file

@ -13,8 +13,8 @@ import { composioAccountsRepo } from '../composio/repo.js';
// Configuration // Configuration
const SYNC_DIR = path.join(WorkDir, 'calendar_sync'); const SYNC_DIR = path.join(WorkDir, 'calendar_sync');
const SYNC_INTERVAL_MS = 5 * 60 * 1000; // Check every 5 minutes const SYNC_INTERVAL_MS = 5 * 60 * 1000; // Check every 5 minutes
const LOOKBACK_DAYS = 14; const LOOKBACK_DAYS = 7;
const COMPOSIO_LOOKBACK_DAYS = 14; const COMPOSIO_LOOKBACK_DAYS = 7;
const REQUIRED_SCOPES = [ const REQUIRED_SCOPES = [
'https://www.googleapis.com/auth/calendar.events.readonly', 'https://www.googleapis.com/auth/calendar.events.readonly',
'https://www.googleapis.com/auth/drive.readonly' 'https://www.googleapis.com/auth/drive.readonly'

View file

@ -9,7 +9,7 @@ import { limitEventItems } from './limit_event_items.js';
const SYNC_DIR = path.join(WorkDir, 'knowledge', 'Meetings', 'fireflies'); const SYNC_DIR = path.join(WorkDir, 'knowledge', 'Meetings', 'fireflies');
const SYNC_INTERVAL_MS = 30 * 60 * 1000; // Check every 30 minutes (reduced from 1 minute) const SYNC_INTERVAL_MS = 30 * 60 * 1000; // Check every 30 minutes (reduced from 1 minute)
const STATE_FILE = path.join(WorkDir, 'fireflies_sync_state.json'); const STATE_FILE = path.join(WorkDir, 'fireflies_sync_state.json');
const LOOKBACK_DAYS = 30; // Last 1 month const LOOKBACK_DAYS = 7; // Last 1 week
const API_DELAY_MS = 2000; // 2 second delay between API calls const API_DELAY_MS = 2000; // 2 second delay between API calls
const RATE_LIMIT_RETRY_DELAY_MS = 60 * 1000; // Wait 1 minute on rate limit const RATE_LIMIT_RETRY_DELAY_MS = 60 * 1000; // Wait 1 minute on rate limit
const MAX_RETRIES = 3; // Maximum retries for rate-limited requests const MAX_RETRIES = 3; // Maximum retries for rate-limited requests

View file

@ -410,7 +410,7 @@ async function partialSync(auth: OAuth2Client, startHistoryId: string, syncDir:
} }
async function performSync() { async function performSync() {
const LOOKBACK_DAYS = 30; // Default to 1 month const LOOKBACK_DAYS = 7; // Default to 1 week
const ATTACHMENTS_DIR = path.join(SYNC_DIR, 'attachments'); const ATTACHMENTS_DIR = path.join(SYNC_DIR, 'attachments');
const STATE_FILE = path.join(SYNC_DIR, 'sync_state.json'); const STATE_FILE = path.join(SYNC_DIR, 'sync_state.json');
@ -444,7 +444,7 @@ async function performSync() {
// --- Composio-based Sync --- // --- Composio-based Sync ---
const COMPOSIO_LOOKBACK_DAYS = 30; const COMPOSIO_LOOKBACK_DAYS = 7;
interface ComposioSyncState { interface ComposioSyncState {
last_sync: string; // ISO string last_sync: string; // ISO string