We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent eb4ca0c commit 8fb9ea1Copy full SHA for 8fb9ea1
1 file changed
apps/webapp/app/services/runs/performRunExecutionV2.server.ts
@@ -153,6 +153,29 @@ export class PerformRunExecutionV2Service {
153
return;
154
}
155
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
179
const client = new EndpointApi(run.environment.apiKey, run.endpoint.url);
180
const event = eventRecordToApiJson(run.event);
181
0 commit comments