Remove payload from task run task events
This commit is contained in:
@@ -207,11 +207,7 @@ export class EventRepository {
|
||||
}
|
||||
|
||||
async insertImmediate(event: CreatableEvent) {
|
||||
await this.db.taskEvent.create({
|
||||
data: event as Prisma.TaskEventCreateInput,
|
||||
});
|
||||
|
||||
this.#publishToRedis([event]);
|
||||
await this.#flushBatch([event]);
|
||||
}
|
||||
|
||||
async insertMany(events: CreatableEvent[]) {
|
||||
|
||||
@@ -275,19 +275,6 @@ export class TriggerTaskService extends BaseService {
|
||||
},
|
||||
});
|
||||
|
||||
if (payloadPacket.data) {
|
||||
if (
|
||||
payloadPacket.dataType === "application/json" ||
|
||||
payloadPacket.dataType === "application/super+json"
|
||||
) {
|
||||
event.setAttribute("payload", JSON.parse(payloadPacket.data) as any);
|
||||
} else {
|
||||
event.setAttribute("payload", payloadPacket.data);
|
||||
}
|
||||
|
||||
event.setAttribute("payloadType", payloadPacket.dataType);
|
||||
}
|
||||
|
||||
event.setAttribute("runId", taskRun.friendlyId);
|
||||
span.setAttribute("runId", taskRun.friendlyId);
|
||||
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
import { task } from "@trigger.dev/sdk/v3";
|
||||
import { setTimeout } from "timers/promises";
|
||||
|
||||
export const nullByteCrash = task({
|
||||
id: "null-byte-parent",
|
||||
run: async (payload: any, { ctx }) => {
|
||||
const nullByteUnicode = "\u0000";
|
||||
|
||||
await setTimeout(5000);
|
||||
|
||||
await nullByteChild.triggerAndWait({
|
||||
message: `Null byte: ${nullByteUnicode}`,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export const nullByteChild = task({
|
||||
id: "null-byte-child",
|
||||
run: async (payload: any, { ctx }) => {},
|
||||
});
|
||||
Reference in New Issue
Block a user