Skip to content

Commit d101ee7

Browse files
committed
Switch to read replica: EventRepository taskEvent.findMany
1 parent 2b3c9ac commit d101ee7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

apps/webapp/app/v3/eventRepository.server.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,14 +334,14 @@ export class EventRepository {
334334
}
335335

336336
async queryEvents(queryOptions: QueryOptions): Promise<TaskEventRecord[]> {
337-
return await this.db.taskEvent.findMany({
337+
return await this.readReplica.taskEvent.findMany({
338338
where: queryOptions,
339339
});
340340
}
341341

342342
async queryIncompleteEvents(queryOptions: QueryOptions) {
343343
// First we will find all the events that match the query options (selecting minimal data).
344-
const taskEvents = await this.db.taskEvent.findMany({
344+
const taskEvents = await this.readReplica.taskEvent.findMany({
345345
where: queryOptions,
346346
select: {
347347
spanId: true,

0 commit comments

Comments
 (0)