mirror of
https://github.com/hcengineering/platform.git
synced 2026-09-26 11:34:58 +02:00
Create queue producers in pipeline phase (#8643)
This commit is contained in:
@@ -34,7 +34,7 @@ export class QueueMiddleware extends BaseMiddleware {
|
||||
readonly queue: PlatformQueue
|
||||
) {
|
||||
super(context, next)
|
||||
this.txProducer = queue.createProducer<Tx>(ctx, QueueTopic.Tx)
|
||||
this.txProducer = queue.getProducer<Tx>(ctx, QueueTopic.Tx)
|
||||
}
|
||||
|
||||
static create (queue: PlatformQueue): MiddlewareCreator {
|
||||
@@ -53,8 +53,4 @@ export class QueueMiddleware extends BaseMiddleware {
|
||||
this.txProducer.send(this.context.workspace.uuid, ctx.contextData.broadcast.txes)
|
||||
])
|
||||
}
|
||||
|
||||
async close (): Promise<void> {
|
||||
await this.txProducer.close()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user