File tree 3 files changed +21
-18
lines changed
references/v3-catalog/src/trigger
3 files changed +21
-18
lines changed Original file line number Diff line number Diff line change @@ -207,11 +207,7 @@ export class EventRepository {
207
207
}
208
208
209
209
async insertImmediate ( event : CreatableEvent ) {
210
- await this . db . taskEvent . create ( {
211
- data : event as Prisma . TaskEventCreateInput ,
212
- } ) ;
213
-
214
- this . #publishToRedis( [ event ] ) ;
210
+ await this . #flushBatch( [ event ] ) ;
215
211
}
216
212
217
213
async insertMany ( events : CreatableEvent [ ] ) {
Original file line number Diff line number Diff line change @@ -275,19 +275,6 @@ export class TriggerTaskService extends BaseService {
275
275
} ,
276
276
} ) ;
277
277
278
- if ( payloadPacket . data ) {
279
- if (
280
- payloadPacket . dataType === "application/json" ||
281
- payloadPacket . dataType === "application/super+json"
282
- ) {
283
- event . setAttribute ( "payload" , JSON . parse ( payloadPacket . data ) as any ) ;
284
- } else {
285
- event . setAttribute ( "payload" , payloadPacket . data ) ;
286
- }
287
-
288
- event . setAttribute ( "payloadType" , payloadPacket . dataType ) ;
289
- }
290
-
291
278
event . setAttribute ( "runId" , taskRun . friendlyId ) ;
292
279
span . setAttribute ( "runId" , taskRun . friendlyId ) ;
293
280
Original file line number Diff line number Diff line change
1
+ import { task } from "@trigger.dev/sdk/v3" ;
2
+ import { setTimeout } from "timers/promises" ;
3
+
4
+ export const nullByteCrash = task ( {
5
+ id : "null-byte-parent" ,
6
+ run : async ( payload : any , { ctx } ) => {
7
+ const nullByteUnicode = "\u0000" ;
8
+
9
+ await setTimeout ( 5000 ) ;
10
+
11
+ await nullByteChild . triggerAndWait ( {
12
+ message : `Null byte: ${ nullByteUnicode } ` ,
13
+ } ) ;
14
+ } ,
15
+ } ) ;
16
+
17
+ export const nullByteChild = task ( {
18
+ id : "null-byte-child" ,
19
+ run : async ( payload : any , { ctx } ) => { } ,
20
+ } ) ;
You can’t perform that action at this time.
0 commit comments