File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed
apps/webapp/app/services/sources Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { workerQueue } from "../worker.server";
4
4
import { requestUrl } from "~/utils/requestUrl.server" ;
5
5
import { RuntimeEnvironmentType } from "@trigger.dev/database" ;
6
6
import { createHttpSourceRequest } from "~/utils/createHttpSourceRequest" ;
7
+ import { logger } from "../logger.server" ;
7
8
8
9
export class HandleHttpSourceService {
9
10
#prismaClient: PrismaClient ;
@@ -19,6 +20,7 @@ export class HandleHttpSourceService {
19
20
endpoint : true ,
20
21
environment : true ,
21
22
secretReference : true ,
23
+ organization : true ,
22
24
} ,
23
25
} ) ;
24
26
@@ -30,6 +32,13 @@ export class HandleHttpSourceService {
30
32
return { status : 200 } ;
31
33
}
32
34
35
+ if ( ! triggerSource . organization . runsEnabled ) {
36
+ logger . debug ( "HandleHttpSourceService: Runs are disabled for this organization" , {
37
+ organizationId : triggerSource . organization . id ,
38
+ } ) ;
39
+ return ;
40
+ }
41
+
33
42
if ( ! triggerSource . interactive ) {
34
43
const sourceRequest = await createHttpSourceRequest ( request ) ;
35
44
You can’t perform that action at this time.
0 commit comments