Skip to content
File

Blob: src/worker/index.ts

typescript20 lines
1import { Sandbox } from "@cloudflare/sandbox";
2import { handleQueueBatch } from "@/worker/dispatch/queue/consumer";
3import { RunWorkflows } from "@/worker/dispatch/workflows";
4import { ProjectDO, RunDO } from "@/worker/durable";
5import { app } from "@/worker/router";
6import type { RunQueueMessage } from "@/worker/contracts";
7 
8const handler: ExportedHandler<Env, RunQueueMessage> = {
9 async fetch(request, env, context) {
10 return await app.fetch(request, env, context);
11 },
12 
13 async queue(batch, env) {
14 await handleQueueBatch(batch, env);
15 },
16};
17 
18export { ProjectDO, RunDO, RunWorkflows, Sandbox };
19export default handler;