Skip to content

Conversation

@Oxyjun
Copy link
Contributor

@Oxyjun Oxyjun commented Feb 21, 2025

Summary

Previously, the Alarms API (Workers Binding API) did not comment on the behaviour of getAlarm if an alarm was already running.

This PR adds in that missing detail, specifically, that:

  • If getAlarm is called while an alarm is running, it will return null, unless setAlarm has been called since the alarm started running.
  • This also implies (though not stated in the doc as it's redundant) that if you call getAlarm within an alarm, it will return null unless setAlarm has been called first inside the alarm.

Screenshots (optional)

Documentation checklist

  • The documentation style guide has been adhered to.
  • If a larger change - such as adding a new page- an issue has been opened in relation to any incorrect or out of date information that this PR fixes.
  • Files which have changed name or location have been allocated redirects.

@Oxyjun Oxyjun requested review from a team, elithrar and vy-ton as code owners February 21, 2025 18:08
@github-actions
Copy link
Contributor

Howdy and thanks for contributing to our repo. We review internal PRs within 1 week. If it's something urgent or has been sitting without a comment, start a thread in the Developer Docs space internally.

@github-actions github-actions bot added product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ size/xs labels Feb 21, 2025
@github-actions
Copy link
Contributor

@Oxyjun Oxyjun merged commit e65285e into production Feb 24, 2025
11 checks passed
@Oxyjun Oxyjun deleted the jun/do/alarm-guidance branch February 24, 2025 09:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

product:durable-objects Durable Objects: https://developers.cloudflare.com/workers/learning/using-durable-objects/ size/xs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants