Added fetch concurrency.
This commit is contained in:
@@ -10,24 +10,6 @@ async function writeToIndex(posts, profilePaths, user) {
|
||||
const filename = interpolate(config.library.index.file, user, null, false);
|
||||
const now = new Date();
|
||||
|
||||
/*
|
||||
// Individual posts are wrapped in [] to get a YAML array value for each individual item, allowing them to be joined manually with a newline
|
||||
// between each entry to improve human readability of the index while maintaining a valid YAML list
|
||||
const originalEntries = user.indexed.original.map(entry => yaml.safeDump([entry]));
|
||||
const newAndUpdatedEntries = posts.concat(user.indexed.updated).map(post => yaml.safeDump([{
|
||||
id: post.id,
|
||||
subreddit: post.subreddit,
|
||||
permalink: post.permalink,
|
||||
url: post.url,
|
||||
hostId: post.host.id,
|
||||
date: post.datetime,
|
||||
indexed: now,
|
||||
title: post.title,
|
||||
}]));
|
||||
|
||||
const entries = newAndUpdatedEntries.concat(originalEntries).join('\n');
|
||||
*/
|
||||
|
||||
const newAndUpdatedEntries = posts.concat(user.indexed.updated).map(post => ({
|
||||
id: post.id,
|
||||
subreddit: post.subreddit,
|
||||
|
||||
Reference in New Issue
Block a user