Skip to content

Commit

Permalink
Parallelize message queue
Browse files Browse the repository at this point in the history
  • Loading branch information
dahlia committed Sep 22, 2024
1 parent 1084bda commit ab2a1d1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/federation/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import {
Like,
type MessageQueue,
Note,
ParallelMessageQueue,
PropertyValue,
Question,
Reject,
Expand Down Expand Up @@ -84,7 +85,10 @@ if (getRedisUrl() == null) {
});
}

export const federation = createFederation({ kv, queue });
export const federation = createFederation({
kv,
queue: new ParallelMessageQueue(queue, 10),
});

federation
.setActorDispatcher("/@{handle}", async (ctx, handle) => {
Expand Down

0 comments on commit ab2a1d1

Please sign in to comment.