diff --git a/util/dailyS3Scheduler.ts b/util/dailyS3Scheduler.ts index 31b9abb..206e1d0 100644 --- a/util/dailyS3Scheduler.ts +++ b/util/dailyS3Scheduler.ts @@ -29,7 +29,7 @@ export class DailyS3Scheduler { // Cron expression for midnight PST // Note: This uses PST timezone. During PDT (daylight time), it will still run at midnight local time - const cronExpression = "0 0 * * *"; // Every day at midnight + const cronExpression = "0 6 * * *"; // Every day at midnight const timezone = "America/Los_Angeles"; // PST/PDT timezone this.cronJob = cron.schedule( diff --git a/util/s3Sync.ts b/util/s3Sync.ts index c2a0dfa..d41e6a6 100644 --- a/util/s3Sync.ts +++ b/util/s3Sync.ts @@ -273,6 +273,12 @@ export class S3Sync { const stat = await fsStat(itemPath); if (stat.isDirectory()) { + // Skip thumbs and ConvertedOriginals folders (case-insensitive) + const itemLower = item.toLowerCase(); + if (itemLower === "thumbs" || itemLower === "convertedoriginals") { + continue; + } + // Recursively analyze subdirectories const subStats = await this.getDirectoryStats(itemPath); document_count += subStats.document_count; @@ -452,6 +458,12 @@ async function getDirectoryStats( const stat = await fsStat(itemPath); if (stat.isDirectory()) { + // Skip thumbs and ConvertedOriginals folders (case-insensitive) + const itemLower = item.toLowerCase(); + if (itemLower === "thumbs" || itemLower === "convertedoriginals") { + continue; + } + // Recursively analyze subdirectories const subStats = await getDirectoryStats(itemPath); document_count += subStats.document_count;