My worker's execution depends on a message from another worker - how to wait without exceeding CPU?
My worker is waiting for a Durable Object websocket message that will take a few seconds to be sent, but the worker's websocket client continues to close after 1 second. The outcome property from Worker Logs is "exceededCpu". Is there a workaround or better way to architect the execution workflow. Worker Log entry below for reference.
"$workers": {
"truncated": false,
"event": {
"cron": "*/10 * * * *",
"scheduledTime": 1746114057000
},
"scriptName": "xyz",
"outcome": "exceededCpu",
"eventType": "cron",
"scriptVersion": {
"id": "04d17a22-bf1b-4935-aa0d-d42a717b24f6"
},
"executionModel": "stateless",
"requestId": "CXVN6AMMN2JP3U9Y"
}
0 Replies