Skip to content

Commit

Permalink
ジョブの並列度を設定できるように
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Apr 17, 2019
1 parent fa98b39 commit d08016a
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
3 changes: 3 additions & 0 deletions .config/example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,3 +113,6 @@ autoAdmin: true

# Clustering
#clusterLimit: 1

# deliverJobConcurrency: 16;
# inboxJobConcurrency: 16;
3 changes: 3 additions & 0 deletions src/config/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ export type Source = {
accesslog?: string;

clusterLimit?: number;

deliverJobConcurrency?: number;
inboxJobConcurrency?: number;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/queue/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,8 @@ export function createImportUserListsJob(user: ILocalUser, fileId: IDriveFile['_

export default function() {
if (!program.onlyServer) {
deliverQueue.process(128, processDeliver);
inboxQueue.process(128, processInbox);
deliverQueue.process(config.deliverJobConcurrency || 16, processDeliver);
inboxQueue.process(config.inboxJobConcurrency || 16, processInbox);
processDb(dbQueue);
}
}
Expand Down

0 comments on commit d08016a

Please sign in to comment.