Remove integrity check for database service
This commit is contained in:
@ -63,7 +63,7 @@ export function performDatabaseIntegrityFixes(db: Database): void {
|
|||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
`⚠️ Could not find matching feed for article: ${article.title} (${articleDomain})`,
|
`! Could not find matching feed for article: ${article.title} (${articleDomain})`,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ export function performDatabaseIntegrityFixes(db: Database): void {
|
|||||||
|
|
||||||
if (orphanedEpisodes.length > 0) {
|
if (orphanedEpisodes.length > 0) {
|
||||||
console.log(
|
console.log(
|
||||||
`⚠️ Found ${orphanedEpisodes.length} episodes with invalid article references`,
|
`! Found ${orphanedEpisodes.length} episodes with invalid article references`,
|
||||||
);
|
);
|
||||||
// We could delete these or try to fix them, but for now just log
|
// We could delete these or try to fix them, but for now just log
|
||||||
}
|
}
|
||||||
@ -289,16 +289,6 @@ export async function saveFeed(
|
|||||||
feed.active !== undefined ? (feed.active ? 1 : 0) : 1, // Default to active=1 if not specified
|
feed.active !== undefined ? (feed.active ? 1 : 0) : 1, // Default to active=1 if not specified
|
||||||
);
|
);
|
||||||
|
|
||||||
try {
|
|
||||||
performDatabaseIntegrityFixes(db);
|
|
||||||
console.log(`Feed saved: ${feed.url}`);
|
|
||||||
} catch (error) {
|
|
||||||
console.error(
|
|
||||||
"Error performing integrity fixes after saving feed:",
|
|
||||||
error,
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
return id;
|
return id;
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("Error saving feed:", error);
|
console.error("Error saving feed:", error);
|
||||||
|
Reference in New Issue
Block a user