Change cron schedule & ignore converted/thumbs.

This commit is contained in:
Patrick Fic
2025-11-10 09:42:13 -08:00
parent 927cde5996
commit f575f6ab9a
2 changed files with 13 additions and 1 deletions

View File

@@ -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(

View File

@@ -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;