Skip to content

Commit 8fb9ea1

Browse files
committed
hotfix
1 parent eb4ca0c commit 8fb9ea1

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

apps/webapp/app/services/runs/performRunExecutionV2.server.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,6 +153,29 @@ export class PerformRunExecutionV2Service {
153153
return;
154154
}
155155

156+
try {
157+
if (
158+
typeof process.env.BLOCKED_ORGS === "string" &&
159+
process.env.BLOCKED_ORGS.includes(run.organizationId)
160+
) {
161+
logger.debug("Skipping execution for blocked org", {
162+
orgId: run.organizationId,
163+
});
164+
165+
await this.#prismaClient.jobRun.update({
166+
where: {
167+
id: run.id,
168+
},
169+
data: {
170+
status: "CANCELED",
171+
completedAt: new Date(),
172+
},
173+
});
174+
175+
return;
176+
}
177+
} catch (e) {}
178+
156179
const client = new EndpointApi(run.environment.apiKey, run.endpoint.url);
157180
const event = eventRecordToApiJson(run.event);
158181

0 commit comments

Comments
 (0)