Skip to content

database transaction 在自定义 EventEmitter 事件处理上有什么特殊要求么? #530

Answered by MarshalW
MarshalW asked this question in Q&A
Discussion options

You must be logged in to vote

Version 0.7.1-alpha.7 下测试没有问题了。

按照你所说的可以正常执行:

await db. emitAsync('ntfSeriesResetValues', { db, seriesIds, transaction });

也就是说,不能自己创建:

const eventEmitter = new MyEmitter();

而是要把 eventEmitter 换为 db

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@MarshalW
Comment options

@chenos
Comment options

@chenos
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by iannil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
2 participants