1000 subrequests can be made _per invocation_, so basically each time the worker is hit. It's not in
1000 subrequests can be made per invocation, so basically each time the worker is hit. It's not in total for the entire lifespan of the worker





sleep("10 minutes"), so I would assume it hibernates a lot cf.worker.upstream_zone to identify if the request comes from a Worker but I noticed that this value is empty when the request is from a Workflow. I'm using this to allow requests to a host only to subrequests from my own workers (and thus Workflows)upstream_zone? Well, if it's expected is ok, I can still match them with my workers.dev domain, thanks a lot!step.sleep is a max duration of 365 days. Is waitForEvent also that long? Does it have a default timeout if I do not specify one? Or will it literally just wait until the end of time?sleep("10 minutes")✘ [ERROR] TypeError: Cannot read properties of undefined (reading 'Symbol(Symbol.dispose)')
at InstanceImpl.sendEvent
(file:///Users/cade/Projects/api/node_modules/miniflare/dist/src/workers/workflows/wrapped-binding.worker.js:57:36)app.post(
"/webhooks/modal/document-parsed",
zValidator(
"json",
z.object({
documentId: z.string(),
instanceId: z.string(),
markdown: z.string(),
siteId: z.string(),
}),
),
async (c) => {
const { documentId, instanceId, markdown, siteId } = c.req.valid("json");
const instance = await c.env.DOCUMENT_WORKFLOW.get(instanceId);
const key = `sites/${siteId}/files/${documentId}.md`;
await c.env.R2.put(key, markdown, {
httpMetadata: { contentType: "text/markdown" },
});
await instance.sendEvent({
type: WorkflowEventType.DocumentParsed,
payload: { markdownFileKey: key },
});
return c.json({ status: "ok" });
},
);cf.worker.upstream_zoneupstream_zonestep.sleepwaitForEventawait step.do("my-debug-step", async () => {
return 'this is how I log, and it will show up as the result of this step'
})
const myResult = await step.do() // this step returns something that we want to log
await step.do("my-debug-step", async () => {
if(myResult) {
return `You can also log results ${JSON.stringify(myResult)}`
}
else {
return `Result is not defined`
}
})