What are the memory constraints inside of a workflow? E.g download a big file, then do some processi
What are the memory constraints inside of a workflow? E.g download a big file, then do some processing in the next step


.log gives me no help outside of saying it requires a .env. I have .dev.vars. If I copy these to .env as well I get no additional errors at all in the log but it still crashes with the same message as the first screenshot


@latest works with local dev too?deploy so assume it still foobars in local dev, thanks @elithrar. Will do 1 big workflow for now as I really only need this to run locally as it's for data migrations/fixturesfetch. (Sadly R2 caching doesn't work within a Worker.) You can also do a server-side mirror with B2 too for high availability, though now that I think about that, it doesn't matter as much with workflows (as they can retry).[[workflows]]
name = "anya-hindmarch-swatch-import"
binding = "SWATCH_IMPORT"
class_name = "SwatchImport"[[workflows]]
name = "anya-hindmarch-swatch-import"
binding = "SWATCH_IMPORT"
class_name = "SwatchImport"
[[workflows]]
name = "anya-hindmarch-foil-import"
binding = "FOIL_IMPORT"
class_name = "FoilImport"export class FirstWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
const files = await step.do('my first step', async () => {
return {
inputParams: event,
files: [],
};
});
const apiResponse = await step.do('some other step', async () => {
let resp = await fetch('https://api.cloudflare.com/client/v4/ips');
return await resp.json<any>();
});
}
}
export class SecondWorkflow extends WorkflowEntrypoint<Env, Params> {
async run(event: WorkflowEvent<Params>, step: WorkflowStep) {
const files = await step.do('some step', async () => {
return {};
});
[[workflows]]
name = "first-workflow"
binding = "FIRST_WORKFLOW"
class_name = "FirstWorkflow"
[[workflows]]
name = "second-workflow"
binding = "SECOND_WORKFLOW"
class_name = "SecondWorkflow"➜ npx wrangler@latest deploy
Total Upload: 1.48 KiB / gzip: 0.62 KiB
Your worker has access to the following bindings:
- Workflows:
- FIRST_WORKFLOW: FirstWorkflow
- SECOND_WORKFLOW: SecondWorkflow
Uploaded two-workflows (1.76 sec)Showing last 3 workflows:
┌───────────────────┬────────────────┬────────────────┬─────────────────────────┬─────────────────────────┐
│ Name │ Script name │ Class name │ Created │ Modified │
├───────────────────┼────────────────┼────────────────┼─────────────────────────┼─────────────────────────┤
│ first-workflow │ two-workflows │ FirstWorkflow │ 10/25/2024, 12:01:24 PM │ 10/25/2024, 12:01:24 PM │
├───────────────────┼────────────────┼────────────────┼─────────────────────────┼─────────────────────────┤
│ second-workflow │ two-workflows │ SecondWorkflow │ 10/25/2024, 12:01:24 PM │ 10/25/2024, 12:01:24 PM │
├───────────────────┼────────────────┼────────────────┼─────────────────────────┼─────────────────────────┤
│ workflows-starter │ workflows-demo │ MyWorkflow │ 10/23/2024, 11:33:58 AM │ 10/24/2024, 7:23:58 PM │
└───────────────────┴────────────────┴────────────────┴─────────────────────────┴─────────────────────────┘