Resolve #4259
This commit is contained in:
@ -9,6 +9,7 @@ import processDeliver from './processors/deliver';
|
||||
import processInbox from './processors/inbox';
|
||||
import processDb from './processors/db';
|
||||
import { queueLogger } from './logger';
|
||||
import { IDriveFile } from '../models/drive-file';
|
||||
|
||||
function initializeQueue(name: string) {
|
||||
return new Queue(name, config.redis != null ? {
|
||||
@ -145,6 +146,16 @@ export function createExportUserListsJob(user: ILocalUser) {
|
||||
});
|
||||
}
|
||||
|
||||
export function createImportUserListsJob(user: ILocalUser, fileId: IDriveFile['_id']) {
|
||||
return dbQueue.add('importUserLists', {
|
||||
user: user,
|
||||
fileId: fileId
|
||||
}, {
|
||||
removeOnComplete: true,
|
||||
removeOnFail: true
|
||||
});
|
||||
}
|
||||
|
||||
export default function() {
|
||||
if (!program.onlyServer) {
|
||||
deliverQueue.process(128, processDeliver);
|
||||
|
Reference in New Issue
Block a user