Skip to content

Commit a24f900

Browse files
Oxyjunpedrosousa
andauthored
[DO] Adding alarm limitation when working in local dev. (#20000)
* Adding alarm limitation when working in local dev. * Describing the issue in more detail. * Update src/content/docs/durable-objects/platform/known-issues.mdx Co-authored-by: Pedro Sousa <[email protected]> --------- Co-authored-by: Pedro Sousa <[email protected]>
1 parent c309c70 commit a24f900

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/content/docs/durable-objects/platform/known-issues.mdx

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,9 @@ For this reason, it is best practice to ensure that API changes between your Wor
3131
The Workers editor in the [Cloudflare dashboard](https://dash.cloudflare.com/) allows you to interactively edit and preview your Worker and Durable Objects. In the editor, Durable Objects can only be talked to by a preview request if the Worker being previewed both exports the Durable Object class and binds to it. Durable Objects exported by other Workers cannot be talked to in the editor preview.
3232

3333
[`wrangler dev`](/workers/wrangler/commands/#dev) has read access to Durable Object storage, but writes will be kept in memory and will not affect persistent data. However, if you specify the `script_name` explicitly in the [Durable Object binding](/workers/runtime-apis/bindings/), then writes will affect persistent data. Wrangler will emit a warning in that case.
34+
35+
## Alarms in local development
36+
37+
Currently, when developing locally (using `npx wrangler dev`), Durable Object [alarm methods](/durable-objects/api/alarms) may fail after a hot reload (if you edit the code while the code is running locally).
38+
39+
To avoid this issue, when using Durable Object alarms, close and restart your `wrangler dev` command after editing your code.

0 commit comments

Comments
 (0)