Fix naming
This commit is contained in:
@@ -135,7 +135,7 @@ export class EventQueue<G extends string, M extends Record<string, EventSpec<Jso
|
|||||||
};
|
};
|
||||||
|
|
||||||
log.trace({ name: front.id }, "dequeuing event");
|
log.trace({ name: front.id }, "dequeuing event");
|
||||||
await this.handleEvent(front.id, front.type, front.payload);
|
await this.processEvent(front.id, front.type, front.payload);
|
||||||
return front;
|
return front;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -199,8 +199,8 @@ export class EventQueue<G extends string, M extends Record<string, EventSpec<Jso
|
|||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
|
|
||||||
private async handleEvent(id: string, type: string, payload: JsonValue) {
|
private async processEvent(id: string, type: string, payload: JsonValue) {
|
||||||
log.info({ id, payload }, "handling event");
|
log.info({ id, payload }, "processing event");
|
||||||
if (!(type in this.opt.events)) throw new Error(`Unknown event type: ${type}`);
|
if (!(type in this.opt.events)) throw new Error(`Unknown event type: ${type}`);
|
||||||
const cfg = this.opt.events[type as keyof M];
|
const cfg = this.opt.events[type as keyof M];
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user