This repository was archived by the owner on Oct 22, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
packages/drivers/cloudflare-workers/src Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -51,10 +51,13 @@ interface LoadedActor {
5151
5252export function createActorDurableObject (
5353 registry : Registry < any > ,
54- runConfig : RunConfig ,
54+ rootRunConfig : RunConfig ,
5555) : DurableObjectConstructor {
5656 const globalState = new CloudflareDurableObjectGlobalState ( ) ;
5757
58+ // Configure to use the runner role instead of server role
59+ const runConfig = Object . assign ( { } , rootRunConfig , { role : "runner" } ) ;
60+
5861 /**
5962 * Startup steps:
6063 * 1. If not already created call `initialize`, otherwise check KV to ensure it's initialized
Original file line number Diff line number Diff line change @@ -52,14 +52,16 @@ export function createServer<R extends Registry<any>>(
5252
5353 // Create config
5454 const runConfig = {
55+ ...config ,
56+ // The worker acts as a server and doesn't run actors
57+ role : "server" ,
5558 driver : {
5659 name : "cloudflare-workers" ,
5760 manager : ( ) => new CloudflareActorsManagerDriver ( ) ,
5861 // HACK: We can't build the actor driver until we're inside the Durable Object
5962 actor : undefined as any ,
6063 } ,
6164 getUpgradeWebSocket : ( ) => upgradeWebSocket ,
62- ...config ,
6365 } satisfies RunConfig ;
6466
6567 // Create Durable Object
You can’t perform that action at this time.
0 commit comments