Skip to content

Commit

Permalink
fix: increase thread pool size (#85)
Browse files Browse the repository at this point in the history
closes #83
  • Loading branch information
derevnjuk authored Aug 30, 2020
1 parent 7d7632e commit bd64ad7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/Bus/Brokers/RabbitMQBus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,19 @@ export class RabbitMQBus implements Bus {

// eslint-disable-next-line max-depth
if (response) {
this.channel.sendToQueue(
const sendResult: boolean = this.channel.sendToQueue(
replyTo,
Buffer.from(JSON.stringify(response)),
{
correlationId
}
);

// eslint-disable-next-line max-depth
if (!sendResult) {
console.log(sendResult);
await new Promise((resolve) => this.channel.once('drain', resolve));
}
}
}
} catch (err) {
Expand Down
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
process.env.UV_THREADPOOL_SIZE = String(1024);
import 'reflect-metadata';
import {
GenerateArchive,
Expand Down

0 comments on commit bd64ad7

Please sign in to comment.