Skip to content

Commit 7f8ce9c

Browse files
committed
Removed the remainder v2 code from the webapp
1 parent b6915f4 commit 7f8ce9c

File tree

3 files changed

+0
-35
lines changed

3 files changed

+0
-35
lines changed

apps/webapp/app/database-types.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import type {
77
BatchTaskRunItemStatus as BatchTaskRunItemStatusType,
88
TaskRunAttemptStatus as TaskRunAttemptStatusType,
99
TaskRunStatus as TaskRunStatusType,
10-
JobRunStatus as JobRunStatusType,
1110
RuntimeEnvironmentType as RuntimeEnvironmentTypeType,
1211
} from "@trigger.dev/database";
1312

@@ -46,24 +45,6 @@ export const TaskRunStatus = {
4645
TIMED_OUT: "TIMED_OUT",
4746
} as const satisfies Record<TaskRunStatusType, TaskRunStatusType>;
4847

49-
export const JobRunStatus = {
50-
PENDING: "PENDING",
51-
QUEUED: "QUEUED",
52-
WAITING_ON_CONNECTIONS: "WAITING_ON_CONNECTIONS",
53-
PREPROCESSING: "PREPROCESSING",
54-
STARTED: "STARTED",
55-
EXECUTING: "EXECUTING",
56-
WAITING_TO_CONTINUE: "WAITING_TO_CONTINUE",
57-
WAITING_TO_EXECUTE: "WAITING_TO_EXECUTE",
58-
SUCCESS: "SUCCESS",
59-
FAILURE: "FAILURE",
60-
TIMED_OUT: "TIMED_OUT",
61-
ABORTED: "ABORTED",
62-
CANCELED: "CANCELED",
63-
UNRESOLVED_AUTH: "UNRESOLVED_AUTH",
64-
INVALID_PAYLOAD: "INVALID_PAYLOAD",
65-
} as const satisfies Record<JobRunStatusType, JobRunStatusType>;
66-
6748
export const RuntimeEnvironmentType = {
6849
PRODUCTION: "PRODUCTION",
6950
STAGING: "STAGING",

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

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -193,15 +193,6 @@ export async function getCurrentPlan(orgId: string) {
193193
firstDayOfNextMonth.setUTCMonth(firstDayOfNextMonth.getUTCMonth() + 1);
194194
firstDayOfNextMonth.setUTCHours(0, 0, 0, 0);
195195

196-
const currentRunCount = await $replica.jobRun.count({
197-
where: {
198-
organizationId: orgId,
199-
createdAt: {
200-
gte: firstDayOfMonth,
201-
},
202-
},
203-
});
204-
205196
if (!result.success) {
206197
logger.error("Error getting current plan", { orgId, error: result.error });
207198
return undefined;
@@ -212,11 +203,6 @@ export async function getCurrentPlan(orgId: string) {
212203
const periodRemainingDuration = periodEnd.getTime() - new Date().getTime();
213204

214205
const usage = {
215-
currentRunCount,
216-
runCountCap: result.subscription?.plan.runs?.freeAllowance,
217-
exceededRunCount: result.subscription?.plan.runs?.freeAllowance
218-
? currentRunCount > result.subscription?.plan.runs?.freeAllowance
219-
: false,
220206
periodStart,
221207
periodEnd,
222208
periodRemainingDuration,

apps/webapp/app/services/telemetry.server.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { Job } from "@trigger.dev/database";
21
import { PostHog } from "posthog-node";
32
import { env } from "~/env.server";
43
import { MatchedOrganization } from "~/hooks/useOrganizations";
@@ -145,7 +144,6 @@ class Telemetry {
145144
},
146145
});
147146
},
148-
deletedJob: ({ job }: { job: Job }) => {},
149147
};
150148

151149
#capture(event: CaptureEvent) {

0 commit comments

Comments
 (0)