Skip to content

Commit 6b2b3ba

Browse files
committed
Fix schedule counting
The TaskSchedule is inactive but instance is still active. I’ve verified the query performance on prod.
1 parent 7a7c4b1 commit 6b2b3ba

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

apps/webapp/app/v3/services/checkSchedule.server.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,15 @@ export class CheckScheduleService extends BaseService {
113113
return await prisma.taskScheduleInstance.count({
114114
where: {
115115
projectId,
116+
active: true,
116117
environment: {
117118
type: {
118119
not: "DEVELOPMENT",
119120
},
120121
},
121-
active: true,
122+
taskSchedule: {
123+
active: true,
124+
},
122125
},
123126
});
124127
}

0 commit comments

Comments
 (0)