Set limit as env

This commit is contained in:
2025-06-07 12:11:13 +09:00
parent eae8e4d15a
commit 39f088641c
2 changed files with 5 additions and 1 deletions

View File

@ -19,3 +19,5 @@ PODCAST_TTL=60
# フィードURL一覧ファイルの設定
FEED_URLS_FILE=feed_urls.txt
LIMIT_UNPROCESSED_ARTICLES=10

View File

@ -193,7 +193,9 @@ async function processUnprocessedArticles(): Promise<void> {
try {
// Get unprocessed articles (limit to prevent overwhelming)
const unprocessedArticles = await getUnprocessedArticles(50);
const unprocessedArticles = await getUnprocessedArticles(
Number.parseInt(import.meta.env["LIMIT_UNPROCESSED_ARTICLES"] || "10"),
);
if (unprocessedArticles.length === 0) {
console.log(" No unprocessed articles found.");