Added fetch concurrency.

This commit is contained in:
2018-07-02 03:45:20 +02:00
parent d1acde5952
commit c1f26440fd
5 changed files with 7 additions and 20 deletions

View File

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