What is the function passed to `step.do` supposed to return? If I return anything at all from it, it
What is the function passed to
step.do
supposed to return? If I return anything at all from it, it causes the workflow to throw an exception after finishing successfully, every time, and I can't figure out what I'm doing wrong12 Replies
Hello, I'm really excited to try Workflows. I tried to add a Workflow to a Remix application. I used the Remix example Framework guide in the Pages docs. Got this error on wrangler deploy: Any ideas on how to fix are appreciated!
My worker is built in a
functions/[[path]].ts
file that looks like: Project was started with https://developers.cloudflare.com/workers/frameworks/framework-guides/remix/
Cloudflare Docs
Remix | Cloudflare Workers docs
Create a Remix application and deploy it to Cloudflare Workers with Workers Assets.
noticing if you have a long output in the trace online it will go off screen (copy button disappears)
also, maybe I missed it, but I haven't figured out how to run a workflow that's been modified locally, as opposed to the one already deployed. Is this where we're at with the beta or did i miss how to?
Unknown User•3w ago
Message Not Public
Sign In & Join Server To View
1. Remix with Vite currently relies on Wrangler's getPlatformProxy() that uses miniflare under the hood. This setup means Remix is running on Node.js and accessing the Env through HTTP getPlatformProxy().
2. By following this PR, you can leverage more features specifically designed for Cloudflare Workers, remix with cloudflare pages will have bumpy journey ahead
3. Run the following commands to set up your development environment:
-
remix vite:dev
on port 3000
- wrangler dev --define "process.env.NODE_ENV:'production'" --log-level=info --port=3001 --test-scheduled app/worker.ts
Note: worker.ts
should be ESM-based for Cloudflare Workers. wrangler dev
enables you to develop queues, crons, and workflows within workerd
environment instead of NodeJS.
the error you're encountering is because getPlatformProxy()
doesn’t work with workflows. If you have [[workflows]]
in wrangler.toml, Miniflare will refer to it, resulting in the error
the development experience for a Vite-powered app has limitations, especially with newer features. This should improve once Vite v6 is released, and Wrangler is updated to support itYou will need to deploy a Worker with your Workflow; you can’t bundle it into your Pages (Remix) app.
I'm getting a
Type instantiation is excessively deep and possibly infinite.
in a step. I don't think it's a very complex type being returnedThanks for reporting it!
is there support for scheduling a workflow to run periodically, like a cron job?
or would I use a worker with a cron trigger to initiate a workflow?
oh the docs address this, yes, nvm
ok in that case
If you want to run it more often than once a minute, you could have your workflow schedule its next run rather than an external trigger. Would just need to jump-start it initially
what does the workflow concurrency limit mean? does that mean that if I have 5k scheduled, 100 will be initally scheduled to run, and as they conplete,m ore will be scheduled?
basically 100 max parallelism?
my usecase is that i'd like to run code every night at midnight, and id love to NOT have to create a separate cloudflare worker with a
scheduled
handler for this
just one instance of that code