mirror of
https://github.com/heygen-com/hyperframes.git
synced 2026-11-15 22:08:03 +00:00
perf(aws-lambda): warm the audio function while the plan runs (#6148)
* perf(aws-lambda): warm the audio function while the plan runs The audio task runs on the x86 render function, which is cold when the plan ran on the arm64 video function. A fire-and-forget invoke at the start of a render now wakes it, so the audio no longer outlasts the chunks. * perf(aws-lambda): warm the render function only on a stack with a video function An x86-only stack has no cold function to warm, so it takes the old path with no extra step. The CDK stack has no video function and is unchanged. * perf(aws-lambda): wrap a template comment * style(aws-lambda): format the warm-up template test
This commit is contained in:
@@ -255,6 +255,19 @@ describe("unwrapEvent", () => {
|
||||
});
|
||||
|
||||
describe("handler dispatch", () => {
|
||||
it("answers a warm event without touching S3 or the project", async () => {
|
||||
const s3 = new FakeS3Client();
|
||||
expect(
|
||||
await handleEvent(
|
||||
{ Action: "warm" },
|
||||
{ s3: s3 as unknown as import("@aws-sdk/client-s3").S3Client, skipChromeResolution: true },
|
||||
),
|
||||
).toEqual({
|
||||
Action: "warm",
|
||||
});
|
||||
expect(s3.ops).toEqual([]);
|
||||
});
|
||||
|
||||
it("preserves explicit v1 plan compatibility", async () => {
|
||||
const tmpRoot = makeTmpRoot();
|
||||
const s3 = new FakeS3Client();
|
||||
|
||||
Reference in New Issue
Block a user