-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
Which Cloudflare product(s) does this pertain to?
Wrangler
What versions & operating system are you using?
Wrangler 4.10
Please provide a link to a minimal reproduction
https://github.com/cloudflare/workers-sdk/tree/main/fixtures/workers-with-assets
Describe the Bug
My original use case was to be able to call a worker from a durable object by using a service binding. I wanted to invoke the same worker that deployes the DO. This was to offload processing of external api calls that the DO needs to when receiving web socket messages (to avoid blocking the DO).
Did not find any explicit mention from documentation if the "self binding" is officially supported, but looking into the workers-sdk repo I found the linked example of a worker declaring a named entry point and invoking that.
Grabbed the code and tried to run it locally with wrangler dev
, when wrangler starts up it reports the service binding as disconnected and is unable to call that.
Is there a way to make this work locally also? Have not tested if it works differently after deploying to cloudflare, as I would need to have both local and real versions working.
Please provide any relevant error logs
Your worker has access to the following bindings:
- Services:
- NAMED: worker-with-assets#NamedEntrypoint [not connected]
- Assets:
- Binding: ASSETS
Metadata
Metadata
Assignees
Labels
Type
Projects
Status