|
|
@ -21,7 +21,6 @@ module.exports = function (Posts) {
|
|
|
|
Posts.getQueuedPosts = async (filter = {}, options = {}) => {
|
|
|
|
Posts.getQueuedPosts = async (filter = {}, options = {}) => {
|
|
|
|
options = { metadata: true, ...options }; // defaults
|
|
|
|
options = { metadata: true, ...options }; // defaults
|
|
|
|
let postData = _.cloneDeep(cache.get('post-queue'));
|
|
|
|
let postData = _.cloneDeep(cache.get('post-queue'));
|
|
|
|
console.log('gg', postData);
|
|
|
|
|
|
|
|
if (!postData) {
|
|
|
|
if (!postData) {
|
|
|
|
const ids = await db.getSortedSetRange('post:queue', 0, -1);
|
|
|
|
const ids = await db.getSortedSetRange('post:queue', 0, -1);
|
|
|
|
const keys = ids.map(id => `post:queue:${id}`);
|
|
|
|
const keys = ids.map(id => `post:queue:${id}`);
|
|
|
|