Compare commits

..

2 Commits

Author SHA1 Message Date
Logan Cusano
f840d754ac Merge branch 'main' of git.vpn.cusano.net:logan/Emmelia-Link-Flayer-Rewrite 2023-03-12 15:54:52 -04:00
Logan Cusano
cb8dfca8dd Return the source title from record promises 2023-03-12 15:54:22 -04:00

View File

@@ -140,7 +140,7 @@ exports.updateFeeds = (client) => {
if (!sendResults) {
log.ERROR("No sending results from sending a post: ", sendResults, existingRecord, post);
return recordReject();
return recordReject("No sending results from sending a post");
}
log.DEBUG("Saving post to database: ", sendResults, post.title, source.channel_id);
@@ -150,7 +150,7 @@ exports.updateFeeds = (client) => {
if (saveResults) {
log.DEBUG("Saved results: ", saveResults);
return recordResolve();
return recordResolve("Saved results", saveResults);
}
});
})
@@ -165,7 +165,7 @@ exports.updateFeeds = (client) => {
}
Promise.all(recordPromiseArray).then((values) => {
log.DEBUG("All posts finished for: ", source.title, values);
return resolve();
return resolve(source.title);
});
});
}))
@@ -174,9 +174,8 @@ exports.updateFeeds = (client) => {
// Wait for all connections to finish then close the temp connections
Promise.all(sourcePromiseArray).then((values) => {
log.DEBUG("Closing temp connections: ", values);
tempFeedStorage.closeConnection();
tempPostStorage.closeConnection();
log.DEBUG("All sources finished, closing temp connections: ", values);
tempConnection.end();
});
});
}