You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a simple Durable Object with an Alarm setup to trigger every 5 seconds.
I start wrangler dev to watch my source code files and reload the worker.
The alarm triggers as expected, but as soon as the code has changes and the worker reloads, then the alarm stops triggerring.
Even though the storage of the DO, and the alarm itself (through ctx.storage.getAlarm()), still exist just fine.
Check the logs below where they show the alarm triggering every 5-seconds, and then they stop after the reload:
triggers.cron alarm at 1717140295004 ::nextAlarmExecutionMs: 1717140300000 ::triggerDetails: {"scriptId":"s_nlP0bNFp6PK29WRwG2CDDzG","triggerId":"strig_cron_sG9btQVqCJQ1P","cronExpression":"*/5 * * * * *","targetUrl":"http://skybear.test:8080/-_-/v1/scripts.triggers.cron.Run?scriptId=s_nlP0bNFp6PK29WRwG2CDDzG&triggerId=strig_cron_sG9btQVqCJQ1P"}
triggers.cron alarm at 1717140300004 ::nextAlarmExecutionMs: 1717140305000 ::triggerDetails: {"scriptId":"s_nlP0bNFp6PK29WRwG2CDDzG","triggerId":"strig_cron_sG9btQVqCJQ1P","cronExpression":"*/5 * * * * *","targetUrl":"http://skybear.test:8080/-_-/v1/scripts.triggers.cron.Run?scriptId=s_nlP0bNFp6PK29WRwG2CDDzG&triggerId=strig_cron_sG9btQVqCJQ1P"}
triggers.cron alarm at 1717140305003 ::nextAlarmExecutionMs: 1717140310000 ::triggerDetails: {"scriptId":"s_nlP0bNFp6PK29WRwG2CDDzG","triggerId":"strig_cron_sG9btQVqCJQ1P","cronExpression":"*/5 * * * * *","targetUrl":"http://skybear.test:8080/-_-/v1/scripts.triggers.cron.Run?scriptId=s_nlP0bNFp6PK29WRwG2CDDzG&triggerId=strig_cron_sG9btQVqCJQ1P"}
⎔ Reloading local server...
╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ [b] open a browser, [d] open Devtools, [l] turn off local mode, [c] clear console, [x] to exit │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
# I KILLED THE wrangler server here after 1 minute.
⎔ Shutting down local server...
Expected behavior
I expected the alarm to continue triggering as usual since all the storage+alarm state is correct.
Steps to reproduce
I don't have a minimal reproduction at hand...need to clean up my project to get it.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered:
As it stands, this is "by-design", since workerd doesn't allow for updating workers without a full reload of the process (killing alarms). As such, I'm going to transfer this to the workerd repo.
Which Cloudflare product(s) does this pertain to?
Workers Runtime
What version(s) of the tool(s) are you using?
wrangler 3.57.1
What version of Node are you using?
v20.10.0
What operating system and version are you using?
Windows 10 - WSL2 - Ubuntu 22.04.3 LTS
Describe the Bug
Observed behavior
Scenario:
wrangler dev
to watch my source code files and reload the worker.The alarm triggers as expected, but as soon as the code has changes and the worker reloads, then the alarm stops triggerring.
Even though the storage of the DO, and the alarm itself (through
ctx.storage.getAlarm()
), still exist just fine.Check the logs below where they show the alarm triggering every 5-seconds, and then they stop after the reload:
Expected behavior
I expected the alarm to continue triggering as usual since all the storage+alarm state is correct.
Steps to reproduce
I don't have a minimal reproduction at hand...need to clean up my project to get it.
Please provide a link to a minimal reproduction
No response
Please provide any relevant error logs
No response
The text was updated successfully, but these errors were encountered: