Possible to cancel an alarm?
I have a project idea with game matchmaking where I have a list of people to be notified. Each person should have 2 minutes to accept this notification. If the person doesn't accept, the next person is notified. If the first person does accept, the entire queue is cancelled.
I can model it two ways, either as a linked list of durable objects or by using a manager object to iterate through a list of durable objects. The reason I am looking at alarms instead of cron jobs is because running the cron job every two minutes to poll doesn't seem like the best use of resources. From the documentation about alarms, I can't see a way to cancel the alarm, but notifying the manager that someone accepted might do the trick. The next time the alarm runs, it can check a boolean and exit. If you have any recommendations or things I should look out for, I appreciate all feedback
0 Replies