We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 28135d5 commit 68317d6Copy full SHA for 68317d6
apps/webapp/app/v3/services/checkSchedule.server.ts
@@ -70,6 +70,12 @@ export class CheckScheduleService extends BaseService {
70
},
71
select: {
72
organizationId: true,
73
+ environments: {
74
+ select: {
75
+ id: true,
76
+ type: true,
77
+ },
78
79
80
});
81
@@ -78,10 +84,9 @@ export class CheckScheduleService extends BaseService {
84
}
85
86
const limit = await getLimit(project.organizationId, "schedules", 100_000_000);
- const schedulesCount = await this._prisma.taskSchedule.count({
82
- where: {
83
- projectId,
- },
87
+ const schedulesCount = await CheckScheduleService.getUsedSchedulesCount({
88
+ prisma: this._prisma,
89
+ environments: project.environments,
90
91
92
if (schedulesCount >= limit) {
0 commit comments