Compare commits
4 Commits
20856734de
...
3c05395ddf
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c05395ddf | ||
|
|
f840d754ac | ||
|
|
cb8dfca8dd | ||
| d372bcd8af |
11
libCore.js
11
libCore.js
@@ -140,7 +140,7 @@ exports.updateFeeds = (client) => {
|
|||||||
|
|
||||||
if (!sendResults) {
|
if (!sendResults) {
|
||||||
log.ERROR("No sending results from sending a post: ", sendResults, existingRecord, post);
|
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);
|
log.DEBUG("Saving post to database: ", sendResults, post.title, source.channel_id);
|
||||||
@@ -150,7 +150,7 @@ exports.updateFeeds = (client) => {
|
|||||||
|
|
||||||
if (saveResults) {
|
if (saveResults) {
|
||||||
log.DEBUG("Saved results: ", 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) => {
|
Promise.all(recordPromiseArray).then((values) => {
|
||||||
log.DEBUG("All posts finished for: ", source.title, 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
|
// Wait for all connections to finish then close the temp connections
|
||||||
|
|
||||||
Promise.all(sourcePromiseArray).then((values) => {
|
Promise.all(sourcePromiseArray).then((values) => {
|
||||||
log.DEBUG("Closing temp connections: ", values);
|
log.DEBUG("All sources finished, closing temp connections: ", values);
|
||||||
tempFeedStorage.closeConnection();
|
tempConnection.end();
|
||||||
tempPostStorage.closeConnection();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user