fix: Do not enqueue event until db transaction committed

This commit is contained in:
Tom Moor
2022-03-18 22:06:26 -07:00
parent 3aaaf73a28
commit 04f1daeec9

View File

@@ -1,6 +1,6 @@
import {
ForeignKey,
AfterCreate,
AfterSave,
BeforeCreate,
BelongsTo,
Column,
@@ -44,7 +44,7 @@ class Event extends BaseModel {
}
}
@AfterCreate
@AfterSave
static async enqueue(model: Event) {
globalEventQueue.add(model);
}