コメント調整

This commit is contained in:
armonica committed 2026-05-02 20:15:29 +09:00
1 parent 49e0fa41e3
commit 5e0202ba31
1 file changed
-3
-3
View File
@@ -337,7 +337,6 @@ app.MapGet("/missav123", async () =>
// --- APIエンドポイントの定義 ---
app.MapGet("/momonga/fanzine", async (HttpContext context, IHttpClientFactory httpClientFactory) =>
{
// 1. 取得対象のURLを10件定義(例として連番パラメーターを生成)
var linkList = new List<string>();
var pageMaster = "https://momon-ga.com/fanzine";
for (int pageId = 1; pageId <= 50; pageId++)
@@ -356,7 +355,6 @@ app.MapGet("/momonga/fanzine", async (HttpContext context, IHttpClientFactory ht
var client = httpClientFactory.CreateClient();
// 2. 10件のRSSを「非同期」かつ「並列」で取得し、メモリに展開せずストリームのままパース
var fetchTasks = linkList.Select(async url =>
{
try
@@ -375,7 +373,6 @@ app.MapGet("/momonga/fanzine", async (HttpContext context, IHttpClientFactory ht
}
});
// 3. 全10件の通信完了を待機し、結果のリストを1つに平坦化 (SelectMany)
var results = await Task.WhenAll(fetchTasks);
var allItems = results.SelectMany(items => items).ToList();