Skip to content

Commit

Permalink
resume after the consumer started
Browse files Browse the repository at this point in the history
  • Loading branch information
igorls committed Dec 18, 2024
1 parent cc002f4 commit 9fa4fc8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/indexer/workers/indexer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ export default class IndexerWorker extends HyperionWorker {
const queueName = process.env.queue;
if (this.ch && queueName) {
this.ch_ready = true;
this.indexQueue.resume();
this.ch.on('close', () => {
hLog('Channel closed for queue:', queueName);
this.indexQueue.pause();
Expand All @@ -81,6 +80,7 @@ export default class IndexerWorker extends HyperionWorker {
await this.ch.assertQueue(queueName, RabbitQueueDef);
await this.ch.prefetch(this.conf.prefetch.index);
await this.ch.consume(queueName, this.indexQueue.push);
this.indexQueue.resume();
}
} catch (e: any) {
hLog(`Error asserting queue: ${e.message}`);
Expand Down

0 comments on commit 9fa4fc8

Please sign in to comment.