mirror of
https://github.com/Unleash/unleash.git
synced 2025-09-19 17:52:45 +02:00
keep the code similar to the previous one
This commit is contained in:
parent
553c5c4927
commit
4a064ec0bb
@ -217,12 +217,12 @@ export class EventStore implements IEventStore {
|
|||||||
environment?: string,
|
environment?: string,
|
||||||
): Promise<number> {
|
): Promise<number> {
|
||||||
const stopTimer = this.metricTimer('getMaxRevisionId');
|
const stopTimer = this.metricTimer('getMaxRevisionId');
|
||||||
const query = this.db(TABLE)
|
const row = await this.db(TABLE)
|
||||||
.max('id')
|
.max('id')
|
||||||
.where(this.typeIsInteresting(environment))
|
.where(this.typeIsInteresting(environment))
|
||||||
.andWhere('id', '>=', largerThan);
|
.andWhere('id', '>=', largerThan)
|
||||||
|
.first();
|
||||||
|
|
||||||
const row = await query.first();
|
|
||||||
stopTimer();
|
stopTimer();
|
||||||
return row?.max ?? 0;
|
return row?.max ?? 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user