Thank you reporting it @DanGamble let us take a look at it
Thank you reporting it @DanGamble let us take a look at it
@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).Compute time per Workflow | 30 seconds of active CPU time

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 │
└───────────────────┴────────────────┴────────────────┴─────────────────────────┴─────────────────────────┘@latestdeployfetchexport 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 {};
});
➜ 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)[[workflows]]
name = "first-workflow"
binding = "FIRST_WORKFLOW"
class_name = "FirstWorkflow"
[[workflows]]
name = "second-workflow"
binding = "SECOND_WORKFLOW"
class_name = "SecondWorkflow"