Skip to content

Commit 29b773c

Browse files
committed
Prevent ingesting events if the org has runs disabled
1 parent 73fb7cf commit 29b773c

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

apps/webapp/app/services/events/ingestSendEvent.server.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ export class IngestSendEvent {
6060
try {
6161
const deliverAt = this.#calculateDeliverAt(options);
6262

63+
if (!environment.organization.runsEnabled) {
64+
logger.debug("IngestSendEvent: Runs are disabled for this organization", environment);
65+
return;
66+
}
67+
6368
return await $transaction(this.#prismaClient, async (tx) => {
6469
const externalAccount = options?.accountId
6570
? await tx.externalAccount.upsert({

0 commit comments

Comments
 (0)