cloudflare / cloudflare/workerd

🐛 BUG: Alarm doesn't work correctly, when calling API many time

Open
#1,358 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
C++
Stars
8.7k
Forks
739
Avg merge
2d 20h
Merged PRs (30d)
174

Description

### Which Cloudflare product(s) does this pertain to?

Workers Runtime

### What version(s) of the tool(s) are you using?

3.9.0

### What version of Node are you using?

18

### What operating system are you using?

Linux

### Describe the Bug

![image](https://github.com/cloudflare/workers-sdk/assets/77241225/f329a5b5-25e3-4e93-ae38-86c2fbafaa29)

Issue: when I call the Water schedule the first time, the water schedule calls every 2 seconds, but when re-call the water schedule a second time it calls every 2 seconds at two times, and but when re-call the water schedule a third time so it calls every 2 seconds at three times

so I want to do this, when I call water many times water schedules should be called at one time every 2 second

### Please provide a link to a minimal reproduction

_No response_

### Please provide any relevant error logs

_No response_

Contributor guide

Open the contributing guide

Research direction

No source file, test, or minimal reproduction is provided. Start by reproducing the Workers Runtime alarm or schedule behavior from the described repeated API calls, then trace the alarm scheduling entry point; done means repeated calls produce one callback every two seconds rather than duplicate callbacks.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp, javascript, node.js
Domain
api, backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
32/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.