major blocker on static assets for now, eagerly waiting ❤️ any workaround? (trying to take advantage
major blocker on static assets for now, eagerly waiting
any workaround? (trying to take advantage of frameworks on workers :D)

DISPATCH_NAMESPACE binding. 0.0.0-2ca4eaef5 with tag dispatch-namespaces-dev as recommended in workers for platforms documentation.unstable_dev "outbound worker".unstable_dev "dispatch worker" that has DISPATCH_NAMESPACE binding with outbound = { service = "outbound-worker" } PUT request <ACCOUNT_ID>/workers/dispatch/namespaces/<NAMESPACE>/scripts/<SCRIPT_NAME> to my local nodejs sever that spawns child process with wrangler dev with user code passed in request body (I am doing it for local testing only, in production it will be pointed to https://api.cloudflare.com). const worker = DISPATCH_NAMESPACE.get(<SCRIPT_NAME>); worker.fetch(...) to dispatch user worker.[wrangler] Couldn\'t find 'wrangler dev' session for "0193d5cc-506a-77db-a12a-c81bd1d6b6dc-0-0-0" in namespace "dev-functions" to proxy to. And no request is being intercepted by my outbound worker.user workers is not being seen by dispatch worker, maybe I should not be using unstable_dev for starting dispatch worker. Would appreciate any help, thanks in advance.
We discourage creating a new namespace for each customer?The RPC receiver does not implement the method "sum". when I try to use itwranger@dispatch-namespaces-dev but local dev environment fails withDISPATCH_NAMESPACEDISPATCH_NAMESPACE0.0.0-2ca4eaef5dispatch-namespaces-devworkers for platformsunstable_devunstable_devunstable_devoutbound = { service = "outbound-worker" }PUTconst worker = DISPATCH_NAMESPACE.get(<SCRIPT_NAME>); worker.fetch(...)[wrangler] Couldn\'t find 'wrangler dev' session for "0193d5cc-506a-77db-a12a-c81bd1d6b6dc-0-0-0" in namespace "dev-functions" to proxy touser workersWe discourage creating a new namespace for each customerThe RPC receiver does not implement the method "sum".wranger@dispatch-namespaces-dev[wrangler] Couldn't find `wrangler dev` session for "customer-worker-1" in namespace "workers-for-platforms-playground" to proxy toname = "0193d5cc-506a-77db-a12a-c81bd1d6b6dc-0-0-0"
main = "./bootloader.js"
compatibility_date = "2024-04-05"
compatibility_flags = [ "nodejs_compat" ]
dispatch_namespace = "dev-functions"import { WorkerEntrypoint } from 'cloudflare:workers'
declare class MyEntrypointType extends WorkerEntrypoint {
sum(args: number[]): number
}
interface Env {
DISPATCHER: DispatchNamespace
}
export default {
async fetch(req, env, ctx): Promise<Response> {
const worker = env.DISPATCHER.get(
'customer-worker-2'
) as Service<MyEntrypointType>
const sum = await worker.sum([1, 2, 3])
return new Response(`${sum}`)
}
} satisfies ExportedHandler<Env>import { WorkerEntrypoint } from 'cloudflare:workers'
export default {
async fetch(
request: Request,
env: Env,
ctx: ExecutionContext
): Promise<Response> {
throw new Error(
"Worker only used for RPC calls, there's no default fetch handler"
)
}
}
export class SumEntrypoint extends WorkerEntrypoint {
sum(args: number[]): number {
return args.reduce((a, b) => a + b)
}
}import { WorkerEntrypoint } from 'cloudflare:workers'
export default class extends WorkerEntrypoint {
async fetch() {
return new Response('Hello from User Worker')
}
sum(args: number[]): number {
return args.reduce((a, b) => a + b)
}
}